lib/nipap/configurable.rb
def validate_credential_type!
      credentials.each do |credential, value|
        next if value.nil?

        unless value.is_a?(String) || value.is_a?(Symbol)
          raise(Error::ConfigurationError, "Invalid #{credential} specified: #{value} must be a string or symbol.")
        end
      end
    end
# Ensures that all credentials set during configuration are of a
# valid type. Valid types are String and Symbol.
#
# @raise [Nipap::Error::ConfigurationError] Error is raised when
#   supplied hermes credentials are not a String or Symbol.
Ensures that all credentials set during configuration are of a
valid type. Valid types are String and Symbol.
Ensures that all credentials set during configuration are of a valid type . Valid types are String and Symbol .
def validate_credential_type!
      credentials.each do |credential, value|
        next if value.nil?
        unless value.is_a?(String) || value.is_a?(Symbol)
          raise(Error::ConfigurationError, "Invalid #{credential} specified: #{value} must be a string or symbol.")
        end
      end
    end
def validate_credential_type! credentials . each do | credential , value | next if value . nil? unless value . is_a? ( String ) || value . is_a? ( Symbol ) raise ( Error :: ConfigurationError , "Invalid #{credential} specified: #{value} must be a string or symbol." ) end end end
Ensures that all credentials set during configuration are of a
valid type.
Ensures that all credentials set during configuration are of a valid type .
[Nipap::Error::ConfigurationError] Error is raised when supplied hermes credentials are not a String or Symbol.
[ Nipap :: Error :: ConfigurationError ] Error is raised when supplied hermes credentials are not a String or Symbol .