Class: GraphqlDevise::MountMethod::OptionValidators::SkipOnlyValidator
- Inherits:
-
Object
- Object
- GraphqlDevise::MountMethod::OptionValidators::SkipOnlyValidator
- Defined in:
- lib/graphql_devise/mount_method/option_validators/skip_only_validator.rb
Instance Method Summary collapse
-
#initialize(options:) ⇒ SkipOnlyValidator
constructor
A new instance of SkipOnlyValidator.
- #validate! ⇒ Object
Constructor Details
#initialize(options:) ⇒ SkipOnlyValidator
Returns a new instance of SkipOnlyValidator.
7 8 9 |
# File 'lib/graphql_devise/mount_method/option_validators/skip_only_validator.rb', line 7 def initialize(options:) @options = end |
Instance Method Details
#validate! ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/graphql_devise/mount_method/option_validators/skip_only_validator.rb', line 11 def validate! if [@options.skip, @options.only].all?(&:present?) raise( InvalidMountOptionsError, "Can't specify both `skip` and `only` options when mounting the route." ) end end |