Class: Shell::Tee
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
| Class Chain: 
          self,
           BuiltInCommand,Filter | |
| Instance Chain: 
          self,
           BuiltInCommand,Filter,
          Enumerable | |
| Inherits: | Shell::BuiltInCommand 
 | 
| Defined in: | lib/shell/builtin-command.rb | 
Class Method Summary
Instance Attribute Summary
Instance Method Summary
Filter - Inherited
| #+ | Outputs  | 
| #< | Inputs from  | 
| #> | Outputs from  | 
| #>> | Appends the output to  | 
| #each | Iterates a block for each line. | 
| #inspect, #to_a, #to_s, | |
| #| | Processes a pipeline. | 
Constructor Details
    .new(sh, filename)  ⇒ Tee 
  
# File 'lib/shell/builtin-command.rb', line 120
def initialize(sh, filename) super sh @to_filename = filename end
Instance Method Details
#each(rs = nil)
[ GitHub ]# 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