Class: ROM::Components::Command
- Defined in:
- lib/rom/components/command.rb,
lib/rom/compat/components.rb
Instance Attribute Summary collapse
-
#constant ⇒ Class
readonly
Component's target class.
Attributes inherited from Core
Instance Method Summary collapse
- #adapter ⇒ Object private
- #build ⇒ Object
Methods inherited from Core
#abstract, #apply_external_plugins, #apply_plugins, #components, #gateway?, #gateway_plugins, #id, #inflector, inherited, #key, #local_components, #namespace, #notifications, #plugin_options, #plugins, #provider_plugins, #trigger, #type
Methods included from Initializer
Instance Attribute Details
#constant ⇒ Class (readonly)
Returns Component's target class.
11 |
# File 'lib/rom/components/command.rb', line 11 option :constant, type: Types.Interface(:new) |
Instance Method Details
#adapter ⇒ 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.
19 20 21 |
# File 'lib/rom/components/command.rb', line 19 def adapter config.adapter end |
#build ⇒ Object
14 15 16 |
# File 'lib/rom/components/command.rb', line 14 def build gateway.command(constant, relation: registry.relations[config.relation]) end |