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



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

def aregion_code
  self[6].to_i
end

#city_nameObject



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_codeObject



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

def province_code
  self[4]
end

#province_nameObject



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_codeObject



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

def state_code
  self[2].to_i
end

#state_nameObject



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_codeObject



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

def zip_code
  self[0].to_i
end