Exception: Gold::Outcomes::Failure
- Defined in:
- lib/gold/outcomes.rb
Overview
General failure class
Instance Attribute Summary collapse
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
Instance Method Summary collapse
-
#initialize(reason = nil, message = nil) ⇒ Failure
constructor
A new instance of Failure.
Methods inherited from Outcome
Constructor Details
#initialize(reason = nil, message = nil) ⇒ Failure
Returns a new instance of Failure.
23 24 25 26 |
# File 'lib/gold/outcomes.rb', line 23 def initialize(reason = nil, = nil) @reason = reason super(false, || reason) end |
Instance Attribute Details
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
21 22 23 |
# File 'lib/gold/outcomes.rb', line 21 def reason @reason end |