Class: PostmonRuby::City

Inherits:
Object
  • Object
show all
Defined in:
lib/postmon_ruby/city.rb

Constant Summary collapse

@@city_attributes =
[ :area_km2, :codigo_ibge ]

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ City

Returns a new instance of City.



8
9
10
11
12
13
# File 'lib/postmon_ruby/city.rb', line 8

def initialize(options={})
  @not_found = true if options.not_found?
  @@city_attributes.each do |attribute|
    send(:"#{attribute}=", options[attribute.to_s] || "") 
  end
end