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 95
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 101
def input=(filter)
  @input.input=filter
  for l in @input
    @io << l
  end
end