Class: ROM::SchemaPlugin Private

Inherits:
PluginBase show all
Includes:
Configurable
Defined in:
lib/rom/schema_plugin.rb

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

Instance Attribute Summary

Attributes inherited from PluginBase

#mod, #options, #type

Instance Method Summary collapse

Methods included from Configurable

#config, #configure

Methods inherited from PluginBase

#initialize, #relation?, #schema?

Constructor Details

This class inherits a constructor from ROM::PluginBase

Instance Method Details

#apply_to(schema, options = EMPTY_HASH) ⇒ Object

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.

Apply this plugin to the provided configuration

Parameters:

  • schema (ROM::Schema)

    A schema instance for extension

  • options (Hash) (defaults to: EMPTY_HASH)

    Extension options



14
15
16
# File 'lib/rom/schema_plugin.rb', line 14

def apply_to(schema, options = EMPTY_HASH)
  mod.apply(schema, options) if mod.respond_to?(:apply)
end

#extend_dsl(dsl) ⇒ Object

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.

Extends a DSL instance with a module provided by the plugin

Parameters:



23
24
25
# File 'lib/rom/schema_plugin.rb', line 23

def extend_dsl(dsl)
  dsl.extend(mod.const_get(:DSL)) if mod.const_defined?(:DSL)
end