Module: Gemmy::Patches::ObjectPatch::InstanceMethods::InstanceAssign

Defined in:
lib/gemmy/patches/object_patch.rb

Instance Method Summary collapse

Instance Method Details

#instance_assign(hash) ⇒ Object

facets assign instance variables with a hash



123
124
125
126
127
128
129
# File 'lib/gemmy/patches/object_patch.rb', line 123

def instance_assign(hash)
  hash.each do |k,v|
    k = "@#{k}" if k !~ /^@/
    instance_variable_set(k, v)
  end
  self
end