Module: Ardm::Property::DirtyMinder

Included in:
Csv, Json, Yaml
Defined in:
lib/ardm/property/support/dirty_minder.rb

Defined Under Namespace

Modules: Hooker

Instance Method Summary collapse

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/ardm/property/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.kind_of?(klass) }
    hook_value(resource, value) unless value.kind_of? Hooker
  end
  super
end