Module: CLLI::Cities::ClassMethods
- Includes:
- Pattern
- Defined in:
- lib/clli/cities.rb
Overview
These methods will be available in the CLLI class.
Instance Method Summary collapse
-
#city_name(place, region) ⇒ Object
Lookup the name of the city that the first 6 characters of the
CLLI
corresond to.
Methods included from Pattern
Instance Method Details
#city_name(place, region) ⇒ Object
Lookup the name of the city that the first 6 characters of the CLLI
corresond to.
Params:
place
-
the first four characters of the
CLLI
. region
-
the next two characters of the
CLLI
.
27 28 29 30 |
# File 'lib/clli/cities.rb', line 27 def city_name(place, region) @cities_data ||= YAMLData.new(%w(clli data cities.yml)) @cities_data.get(region, place, 'city') end |