Sha256: 8b00ebecd8bda2b2c35642607f6f0fb6f6a95890a79a58cb8d63fb7ac96a6c60

Contents?: true

Size: 473 Bytes

Versions: 1

Compression:

Stored size: 473 Bytes

Contents

# frozen_string_literal: true

require_relative '../base_processor'
require_relative './enumerable_adapter'

class ActiveSet
  module Filter
    class Processor < BaseProcessor
      def process
        @structure.reject { |_, v| v.blank? }
                  .reduce(@set) do |set, (key, value)|
                    adapter.new(key, value).process(set)
                  end
      end

      private

      def adapter
        EnumerableAdapter
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activeset-0.1.0 lib/active_set/filter/processor.rb