Module: DataMapper::Is::Predefined

Defined in:
lib/dm-is-predefined/is/predefined.rb,
lib/dm-is-predefined/is/exceptions/unknown_resource.rb

Defined Under Namespace

Modules: ClassMethods, MigrationMethods Classes: UnknownResource

Instance Method Summary collapse

Instance Method Details

#is_predefinedObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Note:

If the model already includes DataMapper::Migrations, then MigrationMethods will be extended into the Model.

Fired when your plugin gets included into a Model.



15
16
17
18
19
20
21
22
# File 'lib/dm-is-predefined/is/predefined.rb', line 15

def is_predefined
  extend DataMapper::Is::Predefined::ClassMethods

  if defined?(DataMapper::Migrations) &&
     included_modules.include?(DataMapper::Migrations)
    extend MigrationMethods
  end
end