Class: PostmonRuby::State

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

Constant Summary collapse

@@state_attributes =
[ :area_km2, :codigo_ibge, :nome ]

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ State

Returns a new instance of State.



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

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