class Shell::Cat - Documentation for Ruby 2.3.0 (original) (raw)

Public Class Methods

new(sh, *filenames) click to toggle source

Calls superclass method

File lib/shell/builtin-command.rb, line 50

def initialize(sh, *filenames) super sh @cat_files = filenames end

Public Instance Methods

each(rs = nil) { |l| ... } click to toggle source

Calls superclass method

File lib/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