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

In Files

  • shell/builtin-command.rb

Shell::Cat

Public Class Methods

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