Class: ROM::Global::PluginDSL
- Inherits:
-
Object
- Object
- ROM::Global::PluginDSL
- Defined in:
- core/lib/rom/global/plugin_dsl.rb
Overview
plugin registration DSL
Instance Method Summary collapse
-
#adapter(type, &block) ⇒ Object
Register plugins for a specific adapter.
-
#register(name, mod, options = EMPTY_HASH) ⇒ Object
Register a plugin.
Instance Method Details
#adapter(type, &block) ⇒ Object
Register plugins for a specific adapter
46 47 48 |
# File 'core/lib/rom/global/plugin_dsl.rb', line 46 def adapter(type, &block) self.class.new(registry, adapter: type, &block) end |
#register(name, mod, options = EMPTY_HASH) ⇒ Object
Register a plugin
37 38 39 |
# File 'core/lib/rom/global/plugin_dsl.rb', line 37 def register(name, mod, = EMPTY_HASH) registry.register(name, mod, defaults.merge()) end |