DataMapper::Types::Paranoid::Base

Public Class Methods

included(model) click to toggle source
   # File lib/dm-types/paranoid/base.rb, line 5
5:         def self.included(model)
6:           model.extend ClassMethods
7:           model.instance_variable_set(:@paranoid_properties, {})
8:         end

Public Instance Methods

paranoid_destroy() click to toggle source
    # File lib/dm-types/paranoid/base.rb, line 10
10:         def paranoid_destroy
11:           model.paranoid_properties.each do |name, block|
12:             attribute_set(name, block.call(self))
13:           end
14:           save_self
15:           self.persistence_state = Resource::PersistenceState::Immutable.new(self)
16:           true
17:         end

Private Instance Methods

_destroy(execute_hooks = true) click to toggle source

@api private

    # File lib/dm-types/paranoid/base.rb, line 22
22:         def _destroy(execute_hooks = true)
23:           return false unless saved?
24:           if execute_hooks
25:             paranoid_destroy
26:           else
27:             super
28:           end
29:         end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.