Method: DataMapper::Property#set!

Defined in:
lib/dm-core/property.rb

#set!(resource, value) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Set the ivar value in the resource

Parameters:

  • resource (Resource)

    the resource to set

  • value (Object)

    the value to set in the resource

Returns:

  • (Object)

    the value set in the resource



647
648
649
# File 'lib/dm-core/property.rb', line 647

def set!(resource, value)
  resource.instance_variable_set(instance_variable_name, value)
end