Class: PipelineToolkit::MessageSink
- Inherits:
-
Object
- Object
- PipelineToolkit::MessageSink
- Includes:
- MessageCommand
- Defined in:
- lib/pipeline_toolkit/message_sink.rb
Instance Attribute Summary
Attributes included from MessageCommand
Instance Method Summary collapse
-
#format_message(message) ⇒ Object
Sort key order.
- #process_standard(message) ⇒ Object
Methods included from MessageCommand
#acknowledge, #cleanup, #description, #initialize, #initialize_machine, #pass_on, #process, #process_system, #send_description, #start, #stop, #write_to_pipe
Instance Method Details
#format_message(message) ⇒ Object
Sort key order
15 16 17 18 19 20 21 22 23 |
# File 'lib/pipeline_toolkit/message_sink.rb', line 15 def () = .sort { |a, b| a[0].to_s <=> b[0].to_s } str = "{" .each_with_index do |item, i| str << "#{item[0].inspect}:#{item[1].inspect}" str << ", " unless i+1 >= .size end str << "}" end |
#process_standard(message) ⇒ Object
6 7 8 9 10 11 12 |
# File 'lib/pipeline_toolkit/message_sink.rb', line 6 def process_standard() if @options[:out] $stdout.puts(()) $stdout.flush end acknowledge() end |