Class: Warg::Executor::Deferred::CallbacksQueue::Outcome
- Inherits:
-
Object
- Object
- Warg::Executor::Deferred::CallbacksQueue::Outcome
- Defined in:
- lib/warg.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#source_outcome ⇒ Object
readonly
Returns the value of attribute source_outcome.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
- #fail!(message) ⇒ Object
- #failed? ⇒ Boolean
- #failure_summary ⇒ Object
-
#initialize(outcome) ⇒ Outcome
constructor
A new instance of Outcome.
- #resolve(value) ⇒ Object
- #successful? ⇒ Boolean
Constructor Details
#initialize(outcome) ⇒ Outcome
Returns a new instance of Outcome.
1703 1704 1705 1706 1707 |
# File 'lib/warg.rb', line 1703 def initialize(outcome) @source_outcome = outcome @host = @source_outcome.host @successful = true end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
1698 1699 1700 |
# File 'lib/warg.rb', line 1698 def error @error end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
1699 1700 1701 |
# File 'lib/warg.rb', line 1699 def host @host end |
#source_outcome ⇒ Object (readonly)
Returns the value of attribute source_outcome.
1700 1701 1702 |
# File 'lib/warg.rb', line 1700 def source_outcome @source_outcome end |
#value ⇒ Object
Returns the value of attribute value.
1701 1702 1703 |
# File 'lib/warg.rb', line 1701 def value @value end |
Instance Method Details
#fail!(message) ⇒ Object
1713 1714 1715 1716 1717 |
# File 'lib/warg.rb', line 1713 def fail!() @successful = false raise CallbackFailedError.new() end |
#failed? ⇒ Boolean
1728 1729 1730 |
# File 'lib/warg.rb', line 1728 def failed? !successful? end |
#failure_summary ⇒ Object
1732 1733 1734 |
# File 'lib/warg.rb', line 1732 def failure_summary error && error. end |
#resolve(value) ⇒ Object
1709 1710 1711 |
# File 'lib/warg.rb', line 1709 def resolve(value) @value = value end |
#successful? ⇒ Boolean
1724 1725 1726 |
# File 'lib/warg.rb', line 1724 def successful? @successful end |