Sha256: d55664db36a4b226ce5cd8a971d71ff8d6beacdacd8cfdf65603376c60b79d89
Contents?: true
Size: 567 Bytes
Versions: 6
Compression:
Stored size: 567 Bytes
Contents
# frozen_string_literal: true require_relative './processor_base' require_relative './processor_filter/enumerable_adapter' require_relative './processor_filter/active_record_adapter' class ActiveSet class Processor::Filter < Processor::Base def process @instructions.reduce(@set) do |set, instruction| adapters.each do |adapter| result = adapter.new(set, [instruction]).process break(result) if result end end end register_adapter(EnumerableAdapter) register_adapter(ActiveRecordAdapter) end end
Version data entries
6 entries across 6 versions & 1 rubygems