Sha256: 916dad11e53801d542dc598103b983b724aafc6dfc2371287d8ecb1fdabe8b67

Contents?: true

Size: 516 Bytes

Versions: 9

Compression:

Stored size: 516 Bytes

Contents

require_relative 'supported_options'

module GraphqlDevise
  module MountMethod
    class OptionSanitizer
      def initialize(options = {}, supported_options = MountMethod::SUPPORTED_OPTIONS)
        @options           = options
        @supported_options = supported_options
      end

      def call!
        @supported_options.each_with_object(Struct.new(*@supported_options.keys).new) do |(key, checker), result|
          result[key] = checker.call!(@options[key], key)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
graphql_devise-0.12.3 lib/graphql_devise/mount_method/option_sanitizer.rb
graphql_devise-0.12.2 lib/graphql_devise/mount_method/option_sanitizer.rb
graphql_devise-0.12.1 lib/graphql_devise/mount_method/option_sanitizer.rb
graphql_devise-0.12.0 lib/graphql_devise/mount_method/option_sanitizer.rb
graphql_devise-0.11.4 lib/graphql_devise/mount_method/option_sanitizer.rb
graphql_devise-0.11.3 lib/graphql_devise/mount_method/option_sanitizer.rb
graphql_devise-0.11.2 lib/graphql_devise/mount_method/option_sanitizer.rb
graphql_devise-0.11.1 lib/graphql_devise/mount_method/option_sanitizer.rb
graphql_devise-0.11.0 lib/graphql_devise/mount_method/option_sanitizer.rb