Class: SellsyV2::Company::Address

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

Instance Method Summary collapse

Constructor Details

#initialize(attr) ⇒ Address

Returns a new instance of Address.



8
9
10
11
12
13
14
15
# File 'lib/sellsy_v2/company/address.rb', line 8

def initialize(attr)
  attr.each do |k,v|
    define_singleton_method(k) { instance_variable_get("@#{k}") }
    define_singleton_method("#{k}=") { |val| instance_variable_set("@#{k}", val) }

    instance_variable_set("@#{k}", v)
  end
end