Class: Locality::Postnummerservice::Entry

Inherits:
Array
  • Object
show all
Defined in:
lib/locality/postnummerservice/entry.rb

Instance Method Summary collapse

Instance Method Details

#aregion_codeObject



32
33
34
# File 'lib/locality/postnummerservice/entry.rb', line 32

def aregion_code
  self[6].to_i
end

#city_nameObject



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_codeObject



24
25
26
# File 'lib/locality/postnummerservice/entry.rb', line 24

def province_code
  self[4]
end

#province_nameObject



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_codeObject



16
17
18
# File 'lib/locality/postnummerservice/entry.rb', line 16

def state_code
  self[2].to_i
end

#state_nameObject



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_codeObject



8
9
10
# File 'lib/locality/postnummerservice/entry.rb', line 8

def zip_code
  self[0].to_i
end