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

Instance Method Summary collapse

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