Class: ROM::Components::Command

Inherits:
Core
  • Object
show all
Defined in:
lib/rom/components/command.rb,
lib/rom/compat/components.rb

Instance Attribute Summary collapse

Attributes inherited from Core

#config, #gateway, #provider

Instance Method Summary collapse

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

extended

Instance Attribute Details

#constantClass (readonly)

Returns Component's target class.

Returns:

  • (Class)

    Component's target class



11
# File 'lib/rom/components/command.rb', line 11

option :constant, type: Types.Interface(:new)

Instance Method Details

#adapterObject

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

#buildObject



14
15
16
# File 'lib/rom/components/command.rb', line 14

def build
  gateway.command(constant, relation: registry.relations[config.relation])
end