Exception: Gold::Outcomes::Outcome
- Inherits:
-
StandardError
- Object
- StandardError
- Gold::Outcomes::Outcome
- Defined in:
- lib/gold/outcomes.rb
Overview
This is the base class for any outcome. Sub-classes are intended to inherit from this and define whether that outcome is considered ok or not.
If any subclass defines an ‘initialize` method, it should call `super` to ensure the `@ok` variable is set.
Instance Method Summary collapse
-
#initialize(is_ok, message = nil) ⇒ Outcome
constructor
A new instance of Outcome.
- #ok? ⇒ Boolean
Constructor Details
#initialize(is_ok, message = nil) ⇒ Outcome
Returns a new instance of Outcome.
9 10 11 12 |
# File 'lib/gold/outcomes.rb', line 9 def initialize(is_ok, = nil) @ok = is_ok super() end |
Instance Method Details
#ok? ⇒ Boolean
14 15 16 |
# File 'lib/gold/outcomes.rb', line 14 def ok? @ok end |