Sha256: 3ed5a0629120490e8ee960fd2a2d83ea3c7c16c985656426759f8b5edec31141

Contents?: true

Size: 494 Bytes

Versions: 2

Compression:

Stored size: 494 Bytes

Contents

module Alf
  module Operator::NonRelational
    class Sort < Alf::Operator()
      include Operator::NonRelational, Operator::Unary

      signature do |s|
        s.argument :ordering, Ordering, []
      end
          
      protected 
    
      def _prepare
        @buffer = Buffer::Sorted.new(ordering)
        @buffer.add_all(input)
      end
    
      def _each
        @buffer.each(&Proc.new)
      end
    
    end # class Sort
  end # module Operator::NonRelational
end # module Alf

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
alf-0.10.1 lib/alf/operator/non_relational/sort.rb
alf-0.10.0 lib/alf/operator/non_relational/sort.rb