Class: ROM::Mapper::Loader::AttributeWriter

Inherits:
Allocator show all
Defined in:
lib/rom/mapper/loader/attribute_writer.rb

Overview

Special type of Allocator loader which uses attribute writers

Instance Method Summary collapse

Methods inherited from ROM::Mapper::Loader

#identity

Instance Method Details

#call(tuple) ⇒ 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.



13
14
15
16
17
# File 'lib/rom/mapper/loader/attribute_writer.rb', line 13

def call(tuple)
  allocate { |attribute, object|
    object.public_send("#{attribute.name}=", tuple[attribute.name])
  }
end