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
32 33 34 |
# File 'lib/locality/postnummerservice/entry.rb', line 32 def aregion_code self[6].to_i end |
#city_name ⇒ Object
12 13 14 |
# File 'lib/locality/postnummerservice/entry.rb', line 12 def city_name self[1].to_s.mb_chars.downcase.titleize.to_s end |
#province_code ⇒ Object
24 25 26 |
# File 'lib/locality/postnummerservice/entry.rb', line 24 def province_code self[4] end |
#province_name ⇒ Object
28 29 30 |
# File 'lib/locality/postnummerservice/entry.rb', line 28 def province_name self[5].to_s.mb_chars.downcase.titleize.to_s end |
#state_code ⇒ Object
16 17 18 |
# File 'lib/locality/postnummerservice/entry.rb', line 16 def state_code self[2].to_i end |
#state_name ⇒ Object
20 21 22 |
# File 'lib/locality/postnummerservice/entry.rb', line 20 def state_name self[3].to_s.mb_chars.downcase.titleize.to_s end |
#zip_code ⇒ Object
8 9 10 |
# File 'lib/locality/postnummerservice/entry.rb', line 8 def zip_code self[0].to_i end |