Class: Shell::Tee (Ruby 2.3.7)
Description: Class : Shell::Tee - Ruby 2.3.7

- Home
- Core 2.3.7
- Std-lib 2.3.7
- Downloads

Support for the Ruby 2.3 series has ended. See here for reference.

### Home Classes Methods

### In Files

- shell/builtin-command.rb

### Parent

Shell::BuiltInCommand

### Methods

- ::new
- #each

### Class/Module Index

Quicksearch

- Shell
- Shell::AppendFile
- Shell::AppendIO
- Shell::BuiltInCommand
- Shell::Cat
- Shell::CommandProcessor
- Shell::Concat
- Shell::Echo
- Shell::Error
- Shell::Filter
- Shell::Glob
- Shell::ProcessController
- Shell::SystemCommand
- Shell::Tee
- Shell::Void

No matching classes.

# Shell::Tee

### Public Class Methods

new(sh, filename) click to toggle source

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