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

Methods

each   new  

Public Class methods

[Source]

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

Public Instance methods

[Source]

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

[Validate]

ruby-doc.org is a community service provided by James Britt and Happy Camper Studios, a Phoenix, Arizona, Ruby application development company.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.