Sha256: 23be20bd7bb12784df2f133868032c0c0d369fc66ada33d792cf41cb7a9cae98
Contents?: true
Size: 795 Bytes
Versions: 18
Compression:
Stored size: 795 Bytes
Contents
# frozen_string_literal: true module GraphqlDevise module MountMethod module OptionValidators class SupportedOperationsValidator def initialize(provided_operations: [], supported_operations: [], key:) @provided_operations = provided_operations @supported_operations = supported_operations @key = key end def validate! unsupported_operations = @provided_operations - @supported_operations if unsupported_operations.present? raise( GraphqlDevise::InvalidMountOptionsError, "#{@key} option contains unsupported operations: \"#{unsupported_operations.join(', ')}\". Check for typos." ) end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems