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