Class: Locality::Postnummerservice::Province
- Inherits:
-
Object
- Object
- Locality::Postnummerservice::Province
show all
- Includes:
- Collection
- Defined in:
- lib/locality/postnummerservice/province.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Collection
#aregion_codes, #city_names, #initialize, #province_codes, #province_names, #state_codes, #state_names, #zip_codes
Class Method Details
.codes ⇒ Object
10
11
12
|
# File 'lib/locality/postnummerservice/province.rb', line 10
def self.codes
Hash[backend.map { |code, entries| [code, entries.first.province_name] }]
end
|
Instance Method Details
#code ⇒ Object
14
15
16
|
# File 'lib/locality/postnummerservice/province.rb', line 14
def code
raw_code.to_s.strip
end
|
#name ⇒ Object
18
19
20
|
# File 'lib/locality/postnummerservice/province.rb', line 18
def name
province_names.first
end
|