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::Cat

Public Class Methods

new(sh, *filenames) click to toggle source
 
               # File shell/builtin-command.rb, line 40
def initialize(sh, *filenames)
  super sh
  @cat_files = filenames
end
            

Public Instance Methods

each(rs = nil) click to toggle source
 
               # File shell/builtin-command.rb, line 45
def each(rs = nil)
  if @cat_files.empty?
    super
  else
    for src in @cat_files
      @shell.foreach(src, rs){|l| yield l}
    end
  end
end