Sha256: 9d68b49497df092edb8aff79bcfc81274291e17a5cfe70aef056299ddf79fefb

Contents?: true

Size: 485 Bytes

Versions: 1

Compression:

Stored size: 485 Bytes

Contents

# frozen_string_literal: true

require_relative "core"

module ROM
  module Components
    # @api public
    class Command < Core
      # @!attribute [r] constant
      #   @return [Class] Component's target class
      option :constant, type: Types.Interface(:new)

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

      # @api private
      def adapter
        config.adapter
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rom-6.0.0.alpha1 lib/rom/components/command.rb