Class: Object

Inherits:
BasicObject
Defined in:
lib/smoke_monster/param_constructor.rb

Instance Method Summary collapse

Instance Method Details

#param_constructorObject



2
3
4
5
6
7
8
9
# File 'lib/smoke_monster/param_constructor.rb', line 2

def param_constructor
  self.class_eval('
  def initialize(params={})
    params.each do |attr, value|
      self.public_send("#{attr}=", value)
    end if params
  end')
end