Sha256: 50d17ce3ecca72e78de67360687ab536fb278f7e175d0d7b84fb403dff114699

Contents?: true

Size: 597 Bytes

Versions: 8

Compression:

Stored size: 597 Bytes

Contents

# frozen_string_literal: true

module ConvenientService
  module Examples
    module Standard
      module 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

8 entries across 8 versions & 1 rubygems

Version Path
convenient_service-0.12.0 lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb
convenient_service-0.11.0 lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb
convenient_service-0.10.1 lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb
convenient_service-0.10.0 lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb
convenient_service-0.9.0 lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb
convenient_service-0.8.0 lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb
convenient_service-0.7.0 lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb
convenient_service-0.6.0 lib/convenient_service/examples/standard/request_params/services/filter_out_unpermitted_params.rb