module Ardm::Property::DirtyMinder::Hooker
Constants
- MUTATION_METHODS
Public Class Methods
extended(instance)
click to toggle source
# File lib/ardm/property/support/dirty_minder.rb, line 96 def self.extended(instance) # FIXME: DirtyMinder is currently unsupported on RBX, because unlike # the other supported Rubies, RBX core class (e.g. Array, Hash) # methods use #send(). In other words, the other Rubies don't use # #send() (they map directly to their C functions). # # The current methodology takes advantage of this by using #send() to # forward method invocations we've hooked. Supporting RBX will # require finding another way, possibly for all Rubies. In the # meantime, something is better than nothing. return if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'rbx' return unless type = MUTATION_METHODS.keys.find { |k| instance.kind_of?(k) } instance.extend const_get("#{type}Hooks") end
Public Instance Methods
track(resource, property)
click to toggle source
# File lib/ardm/property/support/dirty_minder.rb, line 143 def track(resource, property) @resource, @property = resource, property end