Class: CensusFor::Abbrev
- Inherits:
-
Object
- Object
- CensusFor::Abbrev
- Defined in:
- lib/census_for.rb
Class Method Summary collapse
Class Method Details
.converter(abbrev) ⇒ Object
117 118 119 120 121 122 123 124 |
# File 'lib/census_for.rb', line 117 def self.converter(abbrev) if STATES.has_value?(abbrev.downcase) return abbrev.split.map(&:capitalize).join(' ') elsif STATES.has_key?(abbrev.downcase.to_sym) return STATES[abbrev.downcase.to_sym].split.map(&:capitalize).join(' ') else return nil end end |