Class: Locality::Postnummerservice::Entry
- Inherits:
-
Array
- Object
- Array
- Locality::Postnummerservice::Entry
- Defined in:
- lib/locality/postnummerservice/entry.rb
Instance Method Summary collapse
- #aregion_code ⇒ Object
- #city_name ⇒ Object
- #province_code ⇒ Object
- #province_name ⇒ Object
- #state_code ⇒ Object
- #state_name ⇒ Object
- #zip_code ⇒ Object
Instance Method Details
#aregion_code ⇒ Object
31 32 33 |
# File 'lib/locality/postnummerservice/entry.rb', line 31 def aregion_code self[6].to_i end |
#city_name ⇒ Object
11 12 13 |
# File 'lib/locality/postnummerservice/entry.rb', line 11 def city_name self[1].to_s.mb_chars.downcase.titleize.to_s end |
#province_code ⇒ Object
23 24 25 |
# File 'lib/locality/postnummerservice/entry.rb', line 23 def province_code self[4] end |
#province_name ⇒ Object
27 28 29 |
# File 'lib/locality/postnummerservice/entry.rb', line 27 def province_name self[5].to_s.mb_chars.downcase.titleize.to_s end |
#state_code ⇒ Object
15 16 17 |
# File 'lib/locality/postnummerservice/entry.rb', line 15 def state_code self[2].to_i end |
#state_name ⇒ Object
19 20 21 |
# File 'lib/locality/postnummerservice/entry.rb', line 19 def state_name self[3].to_s.mb_chars.downcase.titleize.to_s end |
#zip_code ⇒ Object
7 8 9 |
# File 'lib/locality/postnummerservice/entry.rb', line 7 def zip_code self[0].to_i end |