Sha256: fab318ea95adaf4b32dea9c3e06312fe30b065382fb0d4dd7ff55987dc054990
Contents?: true
Size: 694 Bytes
Versions: 15
Compression:
Stored size: 694 Bytes
Contents
# frozen_string_literal: true require 'rom/support/inflector' module ROM # TODO: look into making command graphs work without the root key in the input # so that we can get rid of this wrapper # # @api private class CommandProxy attr_reader :command, :root # @api private def initialize(command, root = Inflector.singularize(command.name.relation).to_sym) @command = command @root = root end # @api private def call(input) command.call(root => input) end # @api private def >>(other) self.class.new(command >> other) end # @api private def restrictible? command.restrictible? end end end
Version data entries
15 entries across 15 versions & 1 rubygems