Class: InteractiveLogger::ThreadedStepInterface
- Inherits:
-
Object
- Object
- InteractiveLogger::ThreadedStepInterface
- Defined in:
- lib/interactive_logger/threaded_step_interface.rb
Overview
A interface-match for Step, but used simply to communicate with the main thread, which actually manipulates the Step.
Instance Method Summary collapse
- #continue(str = nil) ⇒ Object
- #failure(str = nil) ⇒ Object
-
#initialize(queue) ⇒ ThreadedStepInterface
constructor
A new instance of ThreadedStepInterface.
- #success(str = nil) ⇒ Object
Constructor Details
#initialize(queue) ⇒ ThreadedStepInterface
Returns a new instance of ThreadedStepInterface.
7 8 9 |
# File 'lib/interactive_logger/threaded_step_interface.rb', line 7 def initialize(queue) @queue = queue end |
Instance Method Details
#continue(str = nil) ⇒ Object
11 12 13 |
# File 'lib/interactive_logger/threaded_step_interface.rb', line 11 def continue(str = nil) @queue.push([:continue, str]) end |
#failure(str = nil) ⇒ Object
15 16 17 |
# File 'lib/interactive_logger/threaded_step_interface.rb', line 15 def failure(str = nil) @queue.push([:failure, str]) end |
#success(str = nil) ⇒ Object
19 20 21 |
# File 'lib/interactive_logger/threaded_step_interface.rb', line 19 def success(str = nil) @queue.push([:success, str]) end |