Sha256: 304d0a321f7bd1a1a7cc1eb4ad3e3662b1dfe65946cae83a0dcd25dffded6ac2

Contents?: true

Size: 280 Bytes

Versions: 56

Compression:

Stored size: 280 Bytes

Contents

module MongoMapper
  module Plugins
    module Descendants
      module ClassMethods
        def inherited(descendant)
          (@descendants ||= []) << descendant
          super
        end

        def descendants
          @descendants
        end
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 6 rubygems

Version Path
mongo_mapper-unstable-2010.2.15 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.2.12 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.2.11 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.2.10 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-0.7.0 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.2.9 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.2.8 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.2.5 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.2.4 lib/mongo_mapper/plugins/descendants.rb
novelys_mongo_mapper-0.6.12 lib/novelys_mongo_mapper/plugins/descendants.rb
novelys_mongo_mapper-0.6.11 lib/novelys_mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.2.3 lib/mongo_mapper/plugins/descendants.rb
novelys_mongo_mapper-0.6.10 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.2.2 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.2.1 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.1.31 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.1.30 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.1.29 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.1.28 lib/mongo_mapper/plugins/descendants.rb
mongo_mapper-unstable-2010.1.27 lib/mongo_mapper/plugins/descendants.rb