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.



136
137
138
139
# File 'lib/shell/builtin-command.rb', line 136

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

Instance Method Details

#each(rs = nil) ⇒ Object



141
142
143
144
145
# File 'lib/shell/builtin-command.rb', line 141

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