Class: Kudzu::Model::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/kudzu/model/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(attr = {}) ⇒ Base

Returns a new instance of Base.


4
5
6
# File 'lib/kudzu/model/base.rb', line 4

def initialize(attr = {})
  attr.each { |k, v| public_send("#{k}=", v) if respond_to?("#{k}=") }
end