Method: DataMapper::Model.descendants
- Defined in:
- lib/dm-core/model.rb
.descendants ⇒ DescendantSet
Return all models that extend the Model module
class Foo
include DataMapper::Resource
end
DataMapper::Model.descendants.first #=> Foo
50 51 52 |
# File 'lib/dm-core/model.rb', line 50 def self.descendants @descendants ||= DescendantSet.new end |