Class: DataMapper::Mapper

Inherits:
Object show all
Defined in:
lib/dm2/mapper.rb

Constant Summary collapse

@@observed_attributes =
[]
@@attributes_values =
{}

Class Method Summary collapse

Class Method Details

.attributes(*attributes) ⇒ Object



7
8
9
# File 'lib/dm2/mapper.rb', line 7

def attributes(*attributes)
  @@observed_attributes = attributes
end

.attributes_valuesObject



20
# File 'lib/dm2/mapper.rb', line 20

def attributes_values; @@attributes_values; end

.observed_attributesObject



19
# File 'lib/dm2/mapper.rb', line 19

def observed_attributes; @@observed_attributes; end

.unit_of_work(object, method, values) ⇒ Object



11
12
13
# File 'lib/dm2/mapper.rb', line 11

def unit_of_work(object, method, values)
  @@attributes_values = unit_of_work_observer.observe(object, self, method, values)
end

.unit_of_work_observerObject



15
16
17
# File 'lib/dm2/mapper.rb', line 15

def unit_of_work_observer
  DataMapper::UnitOfWork::Observer
end