Sha256: ff69a50061e68f1055a9d6cac9929dec31106318c4fae3a3cbb174a69c7f6caf

Contents?: true

Size: 596 Bytes

Versions: 5

Compression:

Stored size: 596 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Examples
    module Standard
      class RequestParams
        module Services
          class FilterOutUnpermittedParams
            include ConvenientService::Standard::Config

            attr_reader :params, :permitted_keys

            def initialize(params:, permitted_keys:)
              @params = params
              @permitted_keys = permitted_keys
            end

            def result
              success(params: params.slice(*permitted_keys))
            end
          end
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
convenient_service-0.17.0 lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb
convenient_service-0.16.0 lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb
convenient_service-0.15.0 lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb
convenient_service-0.14.0 lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb
convenient_service-0.13.0 lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb