Sha256: b7b3da4f5dde0c5a2e5eb89c21a15cbfea463d1f58f91baa2127a358a289efe2

Contents?: true

Size: 506 Bytes

Versions: 2

Compression:

Stored size: 506 Bytes

Contents

# frozen_string_literal: true

require 'active_support/core_ext/object/blank'

require_relative './base_processor'
require_relative './sort/enumerable_adapter'
require_relative './sort/active_record_adapter'

class ActiveSet
  class SortProcessor < BaseProcessor
    queue_adapter ActiveRecordAdapter
    queue_adapter EnumerableAdapter

    def process
      adapters.reduce(@set) do |outer_set, adapter|
        @instructions.process_adapter(set: outer_set, adapter: adapter)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activeset-0.4.0 lib/active_set/processors/sort_processor.rb
activeset-0.3.1 lib/active_set/processors/sort_processor.rb