Add .rbs
files
- Implement #<<, #>> composition methods.
- Calls commands in order passing values.
- Return Result early on Failure (or not Success), otherwise final Result.
- ::process - shortcut for defining #process
- ::rescue -
rescue StandardError do ... end
, rescues matched errors in #process - constructor methods:
- Programmatically generate a constructor method. Raises an error if #initialize is defined. Automatically sets instance variables on initialize, and defines reader methods.
- ::arguments - sets all positional arguments in the constructor. Takes 0 or more String or Symbol arguments representing required arguments. Takes an optional hash with String/Symbol keys and arbitrary values, representing optional arguments and their default values.
- ::keywords - sets keyword arguments; same arguments as ::arguments.
- shorthand for referencing a sequence of operations
- MapCommand - wraps a command (or proc) and returns Result with value, errors as array
- RetryCommand - takes command, retry count
- optional only:, except: - restrict what errors are retried
- Implement Command.subclass
- Curries constructor arguments
- Implement Cuprum::AppliedMiddleware < Cuprum::Command
- has readers #root (Class), #middleware (Array)
- #initialize
- initializes root command (passing constructor parameters)
- initializes each middleware command
- if Class defining .instance, call .instance
- if Class, call .new
- if Proc, call #call with constructor parameters
- calls Middleware.apply and caches as private #applied
- #call
- delegates to #applied
- call_command_step matcher
- (optionally) alias be_a_result family as have_result for operations
- #step raises exception unless block or method returns a result