lib/element_numbers/0100/en_0100.rb in experian-data-dictionary-1.4.4 vs lib/element_numbers/0100/en_0100.rb in experian-data-dictionary-1.4.5

- old
+ new

@@ -1,8 +1,7 @@ module Experian class DataDictionary - def self.en_0100_column_name 'Date of Birth' end def self.en_0100_description @@ -12,38 +11,39 @@ def self.en_0100c_column_name 'Combined Adult Age' end def self.en_0100c_description - self.en_0100_description + en_0100_description end - def self.en_0100_value_description(key); ''; end - def self.en_0100c_value_description(key); ''; end + def self.en_0100_value_description(_key) + '' + end + def self.en_0100c_value_description(_key) + '' + end # CCYYMM def self.en_0100(key) return nil if key.empty? year = key[0..3] month = key.length > 4 ? key[4..5] : nil [month, year].compact.join('/') end - def self.en_0100c(key) if key[0].nil? return 'Unknown age' else return nil unless %w(e i u).include?(key[0].to_s.downcase) # I noticed another 0100c column that uses M and F which is probably for Male and Female text = case key[0].downcase - when 'e' then 'Exact age' - when 'i' then 'Estimated age' - when 'u' then 'Unknown age' - else nil - end - return [key[1..key.length-1], text].compact.join(' - ') + when 'e' then 'Exact age' + when 'i' then 'Estimated age' + when 'u' then 'Unknown age' + end + return [key[1..key.length - 1], text].compact.join(' - ') end end - end end