Class: Solid::Output::CallableAndThen::Caller
- Inherits:
-
Result::CallableAndThen::Caller
- Object
- Result::CallableAndThen::Caller
- Solid::Output::CallableAndThen::Caller
- Defined in:
- lib/solid/output/callable_and_then.rb
Defined Under Namespace
Modules: KeyArgs
Class Method Summary collapse
Methods inherited from Result::CallableAndThen::Caller
Class Method Details
.ensure_result_object(source, value, result) ⇒ Object
30 31 32 33 34 35 |
# File 'lib/solid/output/callable_and_then.rb', line 30 def self.ensure_result_object(source, value, result) return result.tap { result.send(:memo).then { _1.merge!(value.merge(_1)) } } if result.is_a?(Output) raise Result::Error::UnexpectedOutcome.build(outcome: result, origin: source, expected: Output::EXPECTED_OUTCOME) end |