Methods

DataMapper::Property::DirtyMinder::Hooker

Constants

MUTATION_METHODS

Public Class Methods

extended(instance) click to toggle source
     # File lib/dm-types/support/dirty_minder.rb, line 96
 96:         def self.extended(instance)
 97:           # FIXME: DirtyMinder is currently unsupported on RBX, because unlike
 98:           # the other supported Rubies, RBX core class (e.g. Array, Hash)
 99:           # methods use #send().  In other words, the other Rubies don't use
100:           # #send() (they map directly to their C functions).
101:           #
102:           # The current methodology takes advantage of this by using #send() to
103:           # forward method invocations we've hooked.  Supporting RBX will
104:           # require finding another way, possibly for all Rubies.  In the
105:           # meantime, something is better than nothing.
106:           return if defined?(RUBY_ENGINE) and RUBY_ENGINE == 'rbx'
107: 
108:           return unless type = MUTATION_METHODS.keys.find { |k| instance.kind_of?(k) }
109:           instance.extend const_get("#{type}Hooks")
110:         end

Public Instance Methods

track(resource, property) click to toggle source
     # File lib/dm-types/support/dirty_minder.rb, line 143
143:         def track(resource, property)
144:           @resource, @property = resource, property
145:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.