Class: Affirm::Struct::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/affirm/struct.rb

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Base

Returns a new instance of Base.



4
5
6
7
8
9
# File 'lib/affirm/struct.rb', line 4

def initialize(attributes = {})
  attributes.each do |key, value|
    m = "#{key}=".to_sym
    send(m, value) if respond_to?(m)
  end
end