Sha256: 110fde9354a64687804e4b79217e4d990fe946f2b078d0f25ce7042dec8d66e7
Contents?: true
Size: 929 Bytes
Versions: 18
Compression:
Stored size: 929 Bytes
Contents
# frozen_string_literal: true require_relative 'supported_operations_validator' module GraphqlDevise module MountMethod module OptionValidators class ProvidedOperationsValidator def initialize(options:, supported_operations:) @options = options @supported_operations = supported_operations end def validate! supported_keys = @supported_operations.keys [ SupportedOperationsValidator.new(provided_operations: @options.skip, key: :skip, supported_operations: supported_keys), SupportedOperationsValidator.new(provided_operations: @options.only, key: :only, supported_operations: supported_keys), SupportedOperationsValidator.new(provided_operations: @options.operations.keys, key: :operations, supported_operations: supported_keys) ].each(&:validate!) end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems