Module: DataMapper::Types::Paranoid::ClassMethods

Defined in:
lib/dm-types/paranoid/base.rb

Instance Method Summary collapse

Instance Method Details

#inherited(model) ⇒ Object



34
35
36
37
# File 'lib/dm-types/paranoid/base.rb', line 34

def inherited(model)
  model.instance_variable_set(:@paranoid_properties, @paranoid_properties.dup)
  super
end

#paranoid_propertiesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



45
46
47
# File 'lib/dm-types/paranoid/base.rb', line 45

def paranoid_properties
  @paranoid_properties
end

#set_paranoid_property(name, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



50
51
52
# File 'lib/dm-types/paranoid/base.rb', line 50

def set_paranoid_property(name, &block)
  paranoid_properties[name] = block
end

#with_deletedObject



40
41
42
# File 'lib/dm-types/paranoid/base.rb', line 40

def with_deleted
  with_exclusive_scope({}) { block_given? ? yield : all }
end