Module: DataMapper::Property::DirtyMinder
Defined Under Namespace
Modules: Hooker
Instance Method Summary collapse
-
#set!(resource, value) ⇒ Object
Catch any direct assignment (#set), and any Resource#reload (set!).
Instance Method Details
#set!(resource, value) ⇒ Object
Catch any direct assignment (#set), and any Resource#reload (set!).
150 151 152 153 154 155 156 |
# File 'lib/dm-types/support/dirty_minder.rb', line 150 def set!(resource, value) # Do not extend non observed value classes if Hooker::MUTATION_METHODS.keys.detect { |klass| value.is_a?(klass) } hook_value(resource, value) unless value.is_a? Hooker end super end |