class Shell::Tee

Public Class Methods

new(sh, filename) click to toggle source
Calls superclass method
# File lib/shell/builtin-command.rb, line 120
def initialize(sh, filename)
  super sh
  @to_filename = filename
end

Public Instance Methods

each(rs = nil) { |l| ... } click to toggle source
Calls superclass method
# File lib/shell/builtin-command.rb, line 125
def each(rs = nil)
  to = @shell.open(@to_filename, "w")
  begin
    super{|l| to << l; yield l}
  ensure
    to.close
  end
end