Sha256: 7d23739cca3a4005b4f12a8b9a2d6f784d8d32dfed9f354c62b04e9d5dd9a675
Contents?: true
Size: 582 Bytes
Versions: 12
Compression:
Stored size: 582 Bytes
Contents
require 'dry/core/inflector' module ROM class Repository # 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 def initialize(command) @command = command @root = Dry::Core::Inflector.singularize(command.name.relation).to_sym end def call(input) command.call(root => input) end def >>(other) self.class.new(command >> other) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems