Module: ROM::Global
- Included in:
- ROM
- Defined in:
- lib/rom/global.rb,
lib/rom/compat/global.rb
Instance Attribute Summary collapse
-
#adapters ⇒ Hash<Symbol=>Module>
readonly
private
An internal adapter identifier => adapter module map used by setup.
-
#handlers ⇒ Plugins
readonly
private
An internal component handler registry.
Class Method Summary collapse
-
.extended(rom) ⇒ Object
private
Set base global registries in ROM constant.
Instance Method Summary collapse
-
#register_adapter(identifier, adapter) ⇒ self
private
Register adapter namespace under a specified identifier.
- #setup(*args, &block) ⇒ Object (also: #container)
Instance Attribute Details
#adapters ⇒ Hash<Symbol=>Module> (readonly)
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.
An internal adapter identifier => adapter module map used by setup
24 25 26 |
# File 'lib/rom/global.rb', line 24 def adapters @adapters end |
#handlers ⇒ Plugins (readonly)
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.
An internal component handler registry
31 32 33 |
# File 'lib/rom/global.rb', line 31 def handlers @handlers end |
Class Method Details
.extended(rom) ⇒ 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.
Set base global registries in ROM constant
13 14 15 16 17 |
# File 'lib/rom/global.rb', line 13 def self.extended(rom) super rom.instance_variable_set("@adapters", {}) end |
Instance Method Details
#register_adapter(identifier, adapter) ⇒ self
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.
Register adapter namespace under a specified identifier
51 52 53 54 |
# File 'lib/rom/global.rb', line 51 def register_adapter(identifier, adapter) adapters[identifier] = adapter self end |