Class Shell::Tee
In: lib/shell/builtin-command.rb
Parent: BuiltInCommand

Methods

each   new  

Public Class methods

[Source]

     # File lib/shell/builtin-command.rb, line 127
127:     def initialize(sh, filename)
128:       super sh
129:       @to_filename = filename
130:     end

Public Instance methods

[Source]

     # File lib/shell/builtin-command.rb, line 132
132:     def each(rs = nil)
133:       to = @shell.open(@to_filename, "w")
134:       begin
135:         super{|l| to << l; yield l}
136:       ensure
137:         to.close
138:       end
139:     end

[Validate]