class Cassandra::Type
Base class for all cassandra types. @abstract This class exists for documentation purposes only
Attributes
kind[R]
@return [Symbol] shorthand type name
Public Class Methods
new(kind)
click to toggle source
# File lib/cassandra/types.rb 26 def initialize(kind) 27 @kind = kind 28 end
Public Instance Methods
assert(value, message = nil, &block)
click to toggle source
Asserts that a given value is of this type @param value [Object] value to be validated @param message [String] error message to use when assertion fails @yieldreturn [String] error message to use when assertion fails @raise [ArgumentError] if the value is invalid @return [void]
# File lib/cassandra/types.rb 43 def assert(value, message = nil, &block) 44 end
new(*values)
click to toggle source
Coerces a given value to this type
@param values [*Object] value to be coerced @return [Object] a value of this type
# File lib/cassandra/types.rb 34 def new(*values) 35 end
to_s()
click to toggle source
@return [String] a cassandra representation of this type
# File lib/cassandra/types.rb 47 def to_s 48 end