View definition

class Axlsx::DataTypeValidator

Defined in


class Axlsx::DataTypeValidator

Validate that the class of the value provided is either an instance or the class of the allowed types and that any specified additional validation returns true.

Perform validation


  • name (String)

    The name of what is being validated. This is included in the error message

  • types (Array, Class)

    A single class or array of classes that the value is validated against.

  • other (Block) (defaults to: false)

    Any block that must evaluate to true for the value to be valid


  • (ArugumentError)

    Raised if the class of the value provided is not in the specified array of types or the block passed returns false

DataTypeValidator is referenced in 0 repositories