Class: PipelineToolkit::Cucumber::Machine
- Includes:
- PipelineIO
- Defined in:
- lib/pipeline_toolkit/cucumber/machine.rb
Overview
Provides an interface for running and interacting with a pipeline_toolkit machine.
Instance Attribute Summary collapse
-
#use_acknowledgements ⇒ Object
readonly
Returns the value of attribute use_acknowledgements.
Attributes included from PipelineIO
Instance Method Summary collapse
- #get_acknowledged_messages(number, timeout = 5) ⇒ Object
- #kill ⇒ Object
- #run(command, use_acknowledgements = true, path = "bin") ⇒ Object
Methods included from PipelineIO
#get_messages, #input_messages
Methods inherited from IOProcess
Instance Attribute Details
#use_acknowledgements ⇒ Object (readonly)
Returns the value of attribute use_acknowledgements.
11 12 13 |
# File 'lib/pipeline_toolkit/cucumber/machine.rb', line 11 def use_acknowledgements @use_acknowledgements end |
Instance Method Details
#get_acknowledged_messages(number, timeout = 5) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/pipeline_toolkit/cucumber/machine.rb', line 25 def (number, timeout = 5) output_msgs = [] get_lines(@sys_pipe, number, timeout) do |line| msg = MessageCoder.decode(line) output_msgs << msg end output_msgs @messages_to_ack.values_at( *output_msgs.map { |msg| msg[:ack_id] } ) end |
#kill ⇒ Object
20 21 22 23 |
# File 'lib/pipeline_toolkit/cucumber/machine.rb', line 20 def kill destroy_sys_pipe super end |
#run(command, use_acknowledgements = true, path = "bin") ⇒ Object
13 14 15 16 17 18 |
# File 'lib/pipeline_toolkit/cucumber/machine.rb', line 13 def run(command, use_acknowledgements = true, path = "bin") super(command, path) @use_acknowledgements = use_acknowledgements setup_system end |