Class: Zuno::CallbackControl
- Inherits:
-
Object
- Object
- Zuno::CallbackControl
- Defined in:
- lib/zuno.rb
Instance Attribute Summary collapse
-
#stop_reason ⇒ Object
readonly
Returns the value of attribute stop_reason.
Instance Method Summary collapse
-
#initialize ⇒ CallbackControl
constructor
A new instance of CallbackControl.
- #stop!(reason: nil) ⇒ Object
- #stopped? ⇒ Boolean
Constructor Details
#initialize ⇒ CallbackControl
Returns a new instance of CallbackControl.
19 20 21 22 |
# File 'lib/zuno.rb', line 19 def initialize @stopped = false @stop_reason = nil end |
Instance Attribute Details
#stop_reason ⇒ Object (readonly)
Returns the value of attribute stop_reason.
17 18 19 |
# File 'lib/zuno.rb', line 17 def stop_reason @stop_reason end |
Instance Method Details
#stop!(reason: nil) ⇒ Object
24 25 26 27 |
# File 'lib/zuno.rb', line 24 def stop!(reason: nil) @stopped = true @stop_reason = reason end |
#stopped? ⇒ Boolean
29 30 31 |
# File 'lib/zuno.rb', line 29 def stopped? @stopped end |