Sha256: 3d282926d8cdccf60a4138dc99fe9d1a12c66c13a4021c3ef2d9f256795e7888

Contents?: true

Size: 618 Bytes

Versions: 5

Compression:

Stored size: 618 Bytes

Contents

module Alf
  module Engine
    #
    # Sort its operand according to an ordering information.
    #
    class Sort < Cog

      # @return [Enumerable] The operand
      attr_reader :operand

      # @return [Ordering] The ordering info
      attr_reader :ordering

      # Creates an Autonum instance
      def initialize(operand, ordering)
        @operand = operand
        @ordering = ordering
      end

      # (see Cog#each)
      def each(&block)
        Sort::InMemory.new(operand, ordering).each(&block)
      end

    end # class Sort
  end # module Engine
end # module Alf
require_relative 'sort/in_memory'

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-0.12.2 lib/alf-engine/alf/engine/sort.rb
alf-0.12.1 lib/alf-engine/alf/engine/sort.rb
alf-0.12.0 lib/alf-engine/alf/engine/sort.rb
alf-0.11.1 lib/alf-engine/alf/engine/sort.rb
alf-0.11.0 lib/alf-engine/alf/engine/sort.rb