Support for the Ruby 2.1 series ended on March 31 2017. See here for details.

In Files

  • shell/builtin-command.rb

Shell::Cat

Public Class Methods

new(sh, *filenames) click to toggle source
 
               # File shell/builtin-command.rb, line 49
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 54
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