class NwmlsClient::Codes
Constants
- ALL_CODES
Public Class Methods
expand_attribute(attr)
click to toggle source
# File lib/nwmls_client/codes.rb, line 446 def self.expand_attribute(attr) begin combined = "#{ALL_CODES.fetch(attr)} (#{attr})" rescue KeyError attr end end
expand_code(attr)
click to toggle source
# File lib/nwmls_client/codes.rb, line 454 def self.expand_code(attr) begin combined = "#{ALL_CODES.fetch(attr)}" field_name = "#{combined.gsub(/\s+/, "_").downcase}" rescue KeyError attr end end
print()
click to toggle source
# File lib/nwmls_client/codes.rb, line 463 def self.print ALL_CODES.each do |key, value| field = value.gsub(/\s+/, "_").downcase puts "add_column :residentials, :#{field}, :string" end end