Module: MongoMapper::Plugins::Safe::ClassMethods

Defined in:
lib/mongo_mapper/plugins/safe.rb

Instance Method Summary collapse

Instance Method Details

#inherited(subclass) ⇒ Object



6
7
8
9
# File 'lib/mongo_mapper/plugins/safe.rb', line 6

def inherited(subclass)
  super
  subclass.safe if safe?
end

#safeObject



11
12
13
# File 'lib/mongo_mapper/plugins/safe.rb', line 11

def safe
  @safe = true
end

#safe?Boolean

Returns:



15
16
17
# File 'lib/mongo_mapper/plugins/safe.rb', line 15

def safe?
  @safe == true
end