Module: SetParams

Defined in:
lib/set_params.rb,
lib/set_params/version.rb

Constant Summary collapse

Version =
'0.1'

Instance Method Summary collapse

Instance Method Details

#initialize(params = {}) ⇒ Object



3
4
5
# File 'lib/set_params.rb', line 3

def initialize(params={})
  set(params)
end

#set(params = {}) ⇒ Object



7
8
9
10
# File 'lib/set_params.rb', line 7

def set(params={})
  params.each { |k, v| send("#{k}=", v) }
  self
end