Class: PostmonRuby::Address

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

Constant Summary collapse

@@address_attributes =
[ :complemento, :bairro, :cidade, :logradouro, :estado, :cep ]

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Address

Returns a new instance of Address.



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

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