Extended maintenance of Ruby versions 1.8.7 and 1.9.2 ended on July 31, 2014. Read more

In Files

  • shell/builtin-command.rb

Shell::Tee

Public Class Methods

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

Public Instance Methods

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