Class: Shell::Concat
- Inherits:
-
BuiltInCommand
- Object
- Filter
- BuiltInCommand
- Shell::Concat
- Defined in:
- lib/shell/builtin-command.rb
Instance Attribute Summary
Attributes inherited from Filter
Instance Method Summary collapse
- #each(rs = nil) ⇒ Object
-
#initialize(sh, *jobs) ⇒ Concat
constructor
A new instance of Concat.
Methods inherited from BuiltInCommand
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 |