Exception: AsyncFutures::InvalidStateError
- Defined in:
- lib/async_futures/error.rb
Overview
Error raised for all invalid Future states.
Instance Attribute Summary collapse
-
#future ⇒ Object
readonly
Returns the value of attribute future.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(future, state) ⇒ InvalidStateError
constructor
A new instance of InvalidStateError.
Constructor Details
#initialize(future, state) ⇒ InvalidStateError
Returns a new instance of InvalidStateError.
15 16 17 18 19 20 |
# File 'lib/async_futures/error.rb', line 15 def initialize(future, state) @future = future @state = state super("Unexpected state '#{@state}' for Future: #{@future}") end |
Instance Attribute Details
#future ⇒ Object (readonly)
Returns the value of attribute future.
13 14 15 |
# File 'lib/async_futures/error.rb', line 13 def future @future end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
13 14 15 |
# File 'lib/async_futures/error.rb', line 13 def state @state end |