Sha256: 0df015aa48351156bec8c6d7e82f693218d5edd4799d0caee51cbabdf9560e29

Contents?: true

Size: 512 Bytes

Versions: 2

Compression:

Stored size: 512 Bytes

Contents

# frozen_string_literal: true

require 'active_support/core_ext/object/blank'

require_relative './base_processor'
require_relative './filter/enumerable_adapter'
require_relative './filter/active_record_adapter'

class ActiveSet
  class FilterProcessor < 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/filter_processor.rb
activeset-0.3.1 lib/active_set/processors/filter_processor.rb