demo/my_functions.rb
# Check for user defined values, either specific value or "empty"
# Return computed value or default value if no user data available
# tx : hash with csv data
# default_value : must be returned if no user data specified
# user_field : symbolized name of field with user data
Check for user defined values, either specific value or "empty"
Return computed value or default value if no user data available
tx : hash with csv data
default_value : must be returned if no user data specified
user_field : symbolized name of field with user data
Check for user defined values either specific value or " empty " Return computed value or default value if no user data available tx : hash with csv data default_value : must be returned if no user data specified user_field : symbolized name of field with user data
def derive_value( tx, default_value, user_field )
			usrdata = tx[user_field] 
			pval = usrdata ? usrdata : default_value 
			pval = nil if usrdata == "empty" 
      return pval
    end
def derive_value ( tx , default_value , user_field ) usrdata = tx [ user_field ] pval = usrdata ? usrdata : default_value pval = nil if usrdata == "empty" return pval end
Check for user defined values, either specific value or "empty"
Return computed value or default value if no user data available
tx : hash with csv data
default_value : must be returned if no user data specified
user_field : symbolized name of field with user data
Check for user defined values either specific value or " empty " Return computed value or default value if no user data available tx : hash with csv data default_value : must be returned if no user data specified user_field : symbolized name of field with user data
# overwrite with user value # nil if wanted
tx
<not_specific>
default_value
<not_specific>
user_field
<not_specific>