Module: ROM::Plugins::ClassMethods
- Included in:
- Command, Components::DSL::Core, Mapper, Relation, Transformer
- Defined in:
- lib/rom/plugins/class_methods.rb
Instance Method Summary collapse
-
#plugins ⇒ Object
Return all available plugins for the component type.
-
#use(name, **options) ⇒ Object
Include a registered plugin in this relation class.
Instance Method Details
#plugins ⇒ Object
Return all available plugins for the component type
23 24 25 |
# File 'lib/rom/plugins/class_methods.rb', line 23 def plugins @plugins ||= ROM.plugins[component_config.type].adapter(component_config.adapter) end |
#use(name, **options) ⇒ Object
Include a registered plugin in this relation class
14 15 16 17 18 |
# File 'lib/rom/plugins/class_methods.rb', line 14 def use(name, **) plugin = plugins[name].configure(**).enable(self).apply component_config.plugins << plugin self end |