Class Shell::Cat
In: shell/builtin-command.rb
Parent: BuiltInCommand

Methods

each   new  

Public Class methods

[Source]

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

Public Instance methods

[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

[Validate]

ruby-doc.org is a community service provided by Happy Camper Studios, a Phoenix, Arizona, Ruby application development company.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.