Class: Population
- Inherits:
-
Object
- Object
- Population
- Includes:
- DecomposerHelper
- Defined in:
- lib/turkish_cities/population.rb
Constant Summary collapse
- CITY_LIST =
YAML.load_file(file_path)
- MIN_POPULATION =
83_644
- MAX_POPULATION =
15_840_901
Instance Method Summary collapse
Methods included from DecomposerHelper
#check_input_range, #cities_not_found_error, #city_not_found_error, #city_population_not_found_error, #convert_chars, #create_district_list, #create_file_path, #district_not_found_error, #find_by_between, #postcode_not_found_error, #prepare_city_list, #sort_alphabetically, #sort_input_numbers, #subdistrict_not_found_error
Instance Method Details
#find_by_population(type, population_one, population_two = nil) ⇒ Object
17 18 19 20 21 |
# File 'lib/turkish_cities/population.rb', line 17 def find_by_population(type, population_one, population_two = nil) result = find_population(type, population_one, population_two) result.length.positive? ? result : city_population_not_found_error end |