Class: Cassandra::Type Abstract

Inherits:
Object
  • Object
show all
Defined in:
lib/cassandra/types.rb

Overview

This class is abstract.

This class exists for documentation purposes only

Base class for all cassandra types.

Instance Method Summary collapse

Instance Method Details

#assert(value, message = nil, &block) ⇒ void

This method returns an undefined value.

Asserts that a given value is of this type

Parameters:

  • value (Object)

    value to be validated

  • message (String) (defaults to: nil)

    error message to use when assertion fails

Yield Returns:

  • (String)

    error message to use when assertion fails

Raises:

  • (ArgumentError)

    if the value is invalid



40
41
# File 'lib/cassandra/types.rb', line 40

def assert(value, message = nil, &block)
end

#kindSymbol

Returns shorthand type name.

Returns:

  • (Symbol)

    shorthand type name



24
25
# File 'lib/cassandra/types.rb', line 24

def kind
end

#new(*values) ⇒ Object

Coerces a given value to this type

Parameters:

  • values (*Object)

    value to be coerced

Returns:

  • (Object)

    a value of this type



31
32
# File 'lib/cassandra/types.rb', line 31

def new(*values)
end

#to_sString

Returns a cassandra representation of this type.

Returns:

  • (String)

    a cassandra representation of this type



44
45
# File 'lib/cassandra/types.rb', line 44

def to_s
end