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

class Sort < Cat

def initialize(sh, *filenames)
  super
end

def each(rs = nil)
  ary = []
  super{|l|       ary.push l}
  for l in ary.sort!
  yield l
  end
end

end

Public Class Methods

new(sh, io, filter) click to toggle source
 
               # File shell/builtin-command.rb, line 101
def initialize(sh, io, filter)
  super sh
  @input = filter
  @io = io
end
            

Public Instance Methods

input=(filter) click to toggle source
 
               # File shell/builtin-command.rb, line 107
def input=(filter)
  @input.input=filter
  for l in @input
    @io << l
  end
end