Class: Zuno::CallbackControl

Inherits:
Object
  • Object
show all
Defined in:
lib/zuno.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCallbackControl

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_reasonObject (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

Returns:



29
30
31
# File 'lib/zuno.rb', line 29

def stopped?
  @stopped
end