Sha256: 0e3f437d4331a49d13499a82c73b9c360bec1ecdb6c79aa46341b30478e15e93

Contents?: true

Size: 495 Bytes

Versions: 7

Compression:

Stored size: 495 Bytes

Contents

# frozen_string_literal: true
module SensitiveDataFilter
  module Middleware
    class Filter
      def initialize(app)
        @app = app
      end

      def call(env)
        env_filter = EnvFilter.new env
        handle_occurrence env_filter
        @app.call env_filter.filtered_env
      end

      private

      def handle_occurrence(env_filter)
        return unless env_filter.occurrence?
        SensitiveDataFilter.handle_occurrence env_filter.occurrence
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sensitive_data_filter-0.3.0 lib/sensitive_data_filter/middleware/filter.rb
sensitive_data_filter-0.2.4 lib/sensitive_data_filter/middleware/filter.rb
sensitive_data_filter-0.2.3 lib/sensitive_data_filter/middleware/filter.rb
sensitive_data_filter-0.2.2 lib/sensitive_data_filter/middleware/filter.rb
sensitive_data_filter-0.2.1 lib/sensitive_data_filter/middleware/filter.rb
sensitive_data_filter-0.2.0 lib/sensitive_data_filter/middleware/filter.rb
sensitive_data_filter-0.1.0 lib/sensitive_data_filter/middleware/filter.rb