Class: Shell::AppendIO

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

Direct Known Subclasses

AppendFile

Instance Attribute Summary

Attributes inherited from Filter

#input

Instance Method Summary collapse

Methods inherited from BuiltInCommand

#active?, #wait?

Methods inherited from Filter

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

Constructor Details

#initialize(sh, io, filter) ⇒ AppendIO

Returns a new instance of AppendIO.



88
89
90
91
92
# File 'lib/shell/builtin-command.rb', line 88

def initialize(sh, io, filter)
  super sh
  @input = filter
  @io = io
end

Instance Method Details

#input=(filter) ⇒ Object



94
95
96
97
98
99
# File 'lib/shell/builtin-command.rb', line 94

def input=(filter)
  @input.input=filter
  for l in @input
    @io << l
  end
end