Class: GraphqlDevise::MountMethod::OptionSanitizer
- Inherits:
-
Object
- Object
- GraphqlDevise::MountMethod::OptionSanitizer
- Defined in:
- lib/graphql_devise/mount_method/option_sanitizer.rb
Instance Method Summary collapse
- #call! ⇒ Object
-
#initialize(options = {}, supported_options = MountMethod::SUPPORTED_OPTIONS) ⇒ OptionSanitizer
constructor
A new instance of OptionSanitizer.
Constructor Details
#initialize(options = {}, supported_options = MountMethod::SUPPORTED_OPTIONS) ⇒ OptionSanitizer
Returns a new instance of OptionSanitizer.
6 7 8 9 |
# File 'lib/graphql_devise/mount_method/option_sanitizer.rb', line 6 def initialize( = {}, = MountMethod::SUPPORTED_OPTIONS) @options = @supported_options = end |
Instance Method Details
#call! ⇒ Object
11 12 13 14 15 |
# File 'lib/graphql_devise/mount_method/option_sanitizer.rb', line 11 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 |