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