Class: Ethikdo::BaseModel

Inherits:
Object
  • Object
show all
Defined in:
lib/ethikdo/base_model.rb

Direct Known Subclasses

Provision, Transaction

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ BaseModel

Returns a new instance of BaseModel.



6
7
8
9
10
11
# File 'lib/ethikdo/base_model.rb', line 6

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