Sha256: eaf77eb66a320dcc4389283c6281c47614fe21362dbc78d05e98fe359d66a2a4

Contents?: true

Size: 436 Bytes

Versions: 4

Compression:

Stored size: 436 Bytes

Contents

module PostmonRuby
  class Address
    @@address_attributes = [ :complemento, :bairro, :cidade, :logradouro, :estado, :cep ]

    attr_reader :not_found, *@@address_attributes

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

    private
    attr_writer *@@address_attributes
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
postmon_ruby-2.1.3 lib/postmon_ruby/address.rb
postmon_ruby-2.1.2 lib/postmon_ruby/address.rb
postmon_ruby-2.1.1 lib/postmon_ruby/address.rb
postmon_ruby-2.1.0 lib/postmon_ruby/address.rb