Module: DataMapper::Types::Paranoid::ClassMethods
- Defined in:
- lib/dm-types/paranoid/base.rb
Overview
module Base
Instance Method Summary (collapse)
- - (Object) inherited(model)
- - (Object) paranoid_properties private
- - (Object) set_paranoid_property(name, &block) private
- - (Object) with_deleted
Instance Method Details
- (Object) inherited(model)
33 34 35 36 |
# File 'lib/dm-types/paranoid/base.rb', line 33 def inherited(model) model.instance_variable_set(:@paranoid_properties, @paranoid_properties.dup) super end |
- (Object) paranoid_properties
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.
44 45 46 |
# File 'lib/dm-types/paranoid/base.rb', line 44 def paranoid_properties @paranoid_properties end |
- (Object) set_paranoid_property(name, &block)
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.
49 50 51 |
# File 'lib/dm-types/paranoid/base.rb', line 49 def set_paranoid_property(name, &block) paranoid_properties[name] = block end |
- (Object) with_deleted
39 40 41 |
# File 'lib/dm-types/paranoid/base.rb', line 39 def with_deleted with_exclusive_scope({}) { block_given? ? yield : all } end |