Class: WorldDb::Model::City

Inherits:
CityBase
  • Object
show all
Defined in:
lib/worlddb/models/city.rb,
lib/worlddb/models/forward.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CityBase

#all_names, create_or_update_from_attribs, create_or_update_from_values, #on_create, #on_update, parse, #synonyms, #synonyms=, #title, #title=

Methods included from TextUtils::ValueHelper

#is_state?, #match_city, #match_country, #match_metro, #match_metro_flag, #match_metro_pop, #match_state_for_country, #match_supra, #match_supra_flag

Class Method Details

.create_or_update_from_titles(titles, more_attribs = {}) ⇒ Object



22
23
24
25
26
27
28
29
# File 'lib/worlddb/models/city.rb', line 22

def self.create_or_update_from_titles( titles, more_attribs = {} )
  # ary of titles e.g. ['Wien', 'Graz'] etc.

  titles.each do |title|
    values = [title]
    City.create_or_update_from_values( values, more_attribs ) 
  end # each city
end

Instance Method Details

#place_kindObject

use place_kind_of_code ??



18
19
20
# File 'lib/worlddb/models/city.rb', line 18

def place_kind   # use place_kind_of_code ??
  'CITY'
end