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 Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(kind) ⇒ Type



26
27
28
# File 'lib/cassandra/types.rb', line 26

def initialize(kind)
  @kind = kind
end

Instance Attribute Details

#kindSymbol (readonly)



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

def kind
  @kind
end

Instance Method Details

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

This method returns an undefined value.

Asserts that a given value is of this type

Yield Returns:

  • (String)

    error message to use when assertion fails

Raises:

  • (ArgumentError)

    if the value is invalid



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

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

#new(*values) ⇒ Object

Coerces a given value to this type



34
35
# File 'lib/cassandra/types.rb', line 34

def new(*values)
end

#to_sString



47
48
# File 'lib/cassandra/types.rb', line 47

def to_s
end