Module: Merge

Instance Method Summary collapse

Instance Method Details

#merge!(hash = {}, &block) ⇒ Object

allows objects to be set from a hash



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

def merge!(hash={}, &block)
  hash.each {|k,v| send("#{k}=",v) }
  block.call(block_arg) if block
end