Class: DataMapper::Mapper
Constant Summary collapse
- @@observed_attributes =
[]
- @@attributes_values =
{}
Class Method Summary collapse
- .attributes(*attributes) ⇒ Object
- .attributes_values ⇒ Object
- .observed_attributes ⇒ Object
- .unit_of_work(object, method, values) ⇒ Object
- .unit_of_work_observer ⇒ Object
Class Method Details
.attributes(*attributes) ⇒ Object
7 8 9 |
# File 'lib/dm2/mapper.rb', line 7 def attributes(*attributes) @@observed_attributes = attributes end |
.attributes_values ⇒ Object
20 |
# File 'lib/dm2/mapper.rb', line 20 def attributes_values; @@attributes_values; end |
.observed_attributes ⇒ Object
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_observer ⇒ Object
15 16 17 |
# File 'lib/dm2/mapper.rb', line 15 def unit_of_work_observer DataMapper::UnitOfWork::Observer end |