Exception: ServiceActor::Failure
- Defined in:
- lib/service_actor/failure.rb
Overview
Default error raised when using ‘fail!` inside an actor.
Instance Attribute Summary collapse
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(result) ⇒ Failure
constructor
A new instance of Failure.
Constructor Details
#initialize(result) ⇒ Failure
Returns a new instance of Failure.
5 6 7 8 9 10 11 |
# File 'lib/service_actor/failure.rb', line 5 def initialize(result) @result = result error = result.respond_to?(:error) ? result.error : nil super(error) end |
Instance Attribute Details
#result ⇒ Object (readonly)
Returns the value of attribute result.
13 14 15 |
# File 'lib/service_actor/failure.rb', line 13 def result @result end |