Sha256: d55b55e98a13c011a2fd732c396cfbf36a3d5fd6252cda51f6b6bcfe7efe73ec

Contents?: true

Size: 636 Bytes

Versions: 18

Compression:

Stored size: 636 Bytes

Contents

module Wukong
  module Streamer
    module PreprocessWithPipeStreamer
      #
      # Runs STDIN through a shell command and then begins processing.
      #
      # If you don't need to do anything to the output of the command, just
      # inherit from Wukong::Script and override the #map_command.
      #
      # You must provide a @preprocess_pipe_command@ method that returns a shell
      # command to run the input through.
      #
      def stream
        #
        `#{preprocess_pipe_command}`.each do |line|
          item = itemize(line) ; next if item.blank?
          process(*item)
        end
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
mrflip-wukong-0.1.0 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.5.4 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.5.3 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.5.2 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.5.1 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.5.0 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.4.12 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.4.11 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.4.10 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.4.9 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.4.7 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.4.6 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.4.5 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.4.2 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.4.1 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-1.4.0 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-0.1.4 lib/wukong/streamer/preprocess_with_pipe_streamer.rb
wukong-0.1.1 lib/wukong/streamer/preprocess_with_pipe_streamer.rb