class BSON::Error::InvalidBinaryType

Raised when providing an invalid type to the Binary.

def initialize(type)

Other tags:
    Api: - private

Parameters:
  • type (Object) -- The invalid type.

Other tags:
    Example: Instantiate the error. -
def initialize(type)
  @type = type
end

def message

Returns:
  • (String) - The error message.

Other tags:
    Example: Get the message. -
def message
  "#{type.inspect} is not a valid binary type. " +
    "Please use one of #{BSON::Binary::SUBTYPES.keys.map(&:inspect).join(", ")}."
end