Class: ROM::Plugin
- Inherits:
-
PluginBase
- Object
- PluginBase
- ROM::Plugin
- Includes:
- Configurable
- Defined in:
- lib/rom/plugin.rb
Overview
Plugin is a simple object used to store plugin configurations
Instance Attribute Summary
Attributes inherited from PluginBase
Instance Method Summary collapse
-
#apply_to(klass, options = EMPTY_HASH) ⇒ Object
private
Apply this plugin to the provided class.
Methods included from Configurable
Methods inherited from PluginBase
#initialize, #relation?, #schema?
Constructor Details
This class inherits a constructor from ROM::PluginBase
Instance Method Details
#apply_to(klass, 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 class
17 18 19 20 21 22 23 |
# File 'lib/rom/plugin.rb', line 17 def apply_to(klass, = EMPTY_HASH) if mod.respond_to?(:new) klass.send(:include, mod.new()) else klass.send(:include, mod) end end |