Class: Shell::Concat

Inherits:
BuiltInCommand show all
Defined in:
lib/shell/builtin-command.rb

Instance Attribute Summary

Attributes inherited from Filter

#input

Instance Method Summary collapse

Methods inherited from BuiltInCommand

#active?, #wait?

Methods inherited from Filter

#+, #<, #>, #>>, #inspect, #to_a, #to_s, #|

Constructor Details

#initialize(sh, *jobs) ⇒ Concat

Returns a new instance of Concat.



149
150
151
152
# File 'lib/shell/builtin-command.rb', line 149

def initialize(sh, *jobs)
  super(sh)
  @jobs = jobs
end

Instance Method Details

#each(rs = nil) ⇒ Object



154
155
156
157
158
# File 'lib/shell/builtin-command.rb', line 154

def each(rs = nil)
  while job = @jobs.shift
    job.each{|l| yield l}
  end
end