Sha256: 1d9e00441a745cab9e4f610cb2d8c5665032623baddc953c0d28b9ffaacda442

Contents?: true

Size: 486 Bytes

Versions: 9

Compression:

Stored size: 486 Bytes

Contents

module GraphqlDevise
  module MountMethod
    module OptionValidators
      class SkipOnlyValidator
        def initialize(options:)
          @options = options
        end

        def validate!
          if [@options.skip, @options.only].all?(&:present?)
            raise(
              GraphqlDevise::InvalidMountOptionsError,
              "Can't specify both `skip` and `only` options when mounting the route."
            )
          end
        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_validators/skip_only_validator.rb
graphql_devise-0.12.2 lib/graphql_devise/mount_method/option_validators/skip_only_validator.rb
graphql_devise-0.12.1 lib/graphql_devise/mount_method/option_validators/skip_only_validator.rb
graphql_devise-0.12.0 lib/graphql_devise/mount_method/option_validators/skip_only_validator.rb
graphql_devise-0.11.4 lib/graphql_devise/mount_method/option_validators/skip_only_validator.rb
graphql_devise-0.11.3 lib/graphql_devise/mount_method/option_validators/skip_only_validator.rb
graphql_devise-0.11.2 lib/graphql_devise/mount_method/option_validators/skip_only_validator.rb
graphql_devise-0.11.1 lib/graphql_devise/mount_method/option_validators/skip_only_validator.rb
graphql_devise-0.11.0 lib/graphql_devise/mount_method/option_validators/skip_only_validator.rb