module MongoMapper::Plugins::Safe::ClassMethods
Attributes
safe_options[R]
Public Instance Methods
collection_options()
click to toggle source
Calls superclass method
# File lib/mongo_mapper/plugins/safe.rb, line 24 def collection_options if @safe_options super.merge(write: Utils.get_safe_options(safe: @safe_options)) else super end end
inherited(subclass)
click to toggle source
Calls superclass method
# File lib/mongo_mapper/plugins/safe.rb, line 10 def inherited(subclass) super subclass.safe(safe_options) if safe? end
safe(options = true)
click to toggle source
# File lib/mongo_mapper/plugins/safe.rb, line 15 def safe(options = true) @safe_options = options end
safe?()
click to toggle source
# File lib/mongo_mapper/plugins/safe.rb, line 19 def safe? @safe_options ||= nil !!@safe_options end