Module: MongoMapper::Plugins::Descendants::ClassMethods

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

Instance Method Summary collapse

Instance Method Details

#descendantsObject



10
11
12
# File 'lib/mongo_mapper/plugins/descendants.rb', line 10

def descendants
  @descendants
end

#inherited(descendant) ⇒ Object



5
6
7
8
# File 'lib/mongo_mapper/plugins/descendants.rb', line 5

def inherited(descendant)
  (@descendants ||= []) << descendant
  super
end