Class: Cassandra::Type Abstract
- Inherits:
-
Object
- Object
- Cassandra::Type
- Defined in:
- lib/cassandra/types.rb
Overview
This class exists for documentation purposes only
Base class for all cassandra types.
Direct Known Subclasses
Cassandra::Types::Ascii, Cassandra::Types::Bigint, Cassandra::Types::Blob, Cassandra::Types::Boolean, Cassandra::Types::Counter, Cassandra::Types::Custom, Cassandra::Types::Date, Cassandra::Types::Decimal, Cassandra::Types::Double, Cassandra::Types::Duration, Cassandra::Types::Float, Cassandra::Types::Frozen, Cassandra::Types::Inet, Cassandra::Types::Int, Cassandra::Types::List, Cassandra::Types::Map, Cassandra::Types::Set, Cassandra::Types::Smallint, Cassandra::Types::Text, Cassandra::Types::Time, Cassandra::Types::Timestamp, Cassandra::Types::Timeuuid, Cassandra::Types::Tinyint, Cassandra::Types::Tuple, Cassandra::Types::UserDefined, Cassandra::Types::Uuid, Cassandra::Types::Varint
Instance Attribute Summary collapse
-
#kind ⇒ Symbol
readonly
Shorthand type name.
Instance Method Summary collapse
-
#assert(value, message = nil, &block) ⇒ void
Asserts that a given value is of this type.
-
#initialize(kind) ⇒ Type
constructor
A new instance of Type.
-
#new(*values) ⇒ Object
Coerces a given value to this type.
-
#to_s ⇒ String
A cassandra representation of this type.
Constructor Details
#initialize(kind) ⇒ Type
Returns a new instance of Type.
26 27 28 |
# File 'lib/cassandra/types.rb', line 26 def initialize(kind) @kind = kind end |
Instance Attribute Details
#kind ⇒ Symbol (readonly)
Returns shorthand type name.
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
43 44 |
# File 'lib/cassandra/types.rb', line 43 def assert(value, = 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_s ⇒ String
Returns a cassandra representation of this type.
47 48 |
# File 'lib/cassandra/types.rb', line 47 def to_s end |