Sha256: fb5340e21fc813fc0471e3bb92fab14cd1227ca6df09419a19cf96e108df9536
Contents?: true
Size: 780 Bytes
Versions: 8
Compression:
Stored size: 780 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( InvalidMountOptionsError, "#{@key} option contains unsupported operations: \"#{unsupported_operations.join(', ')}\". Check for typos." ) end end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems