Sha256: b53750e3db2bb29801f417ce10ea5a0ba0cc7d85ad4edc475b3f04124108dbb8

Contents?: true

Size: 699 Bytes

Versions: 4

Compression:

Stored size: 699 Bytes

Contents

# frozen_string_literal: true

module Trailblazer
  class Finder
    module Activity
      module Process
        # Process Filters Activity
        module Filters
          extend Trailblazer::Activity::Railway()

          module_function

          def set_filter_handlers(ctx, **)
            return true unless ctx[:process]

            ctx[:process].each do |key, value|
              next if ctx[:process][key][:filter].nil?

              ctx[:process][key][:handler] = Utils::Extra.apply_handler(value[:filter] ? value[:filter][:handler] : "none")
            end
          end

          step method(:set_filter_handlers), id: :set_filter_handlers
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trailblazer-finder-0.3.0 lib/trailblazer/finder/activity/process/filters.rb
trailblazer-finder-0.2.7 lib/trailblazer/finder/activity/process/filters.rb
trailblazer-finder-0.2.6 lib/trailblazer/finder/activity/process/filters.rb
trailblazer-finder-0.2.5 lib/trailblazer/finder/activity/process/filters.rb