Module: CassandraObject::Identity::Key

Included in:
CustomKeyFactory::CustomKey, NaturalKeyFactory::NaturalKey, UUIDKeyFactory::UUID
Defined in:
lib/cassandra_object/identity/key.rb

Overview

An “interface” that keys need to implement

You don’t have to include this. But, there’s no reason I can think of not to.

Instance Method Summary collapse

Instance Method Details

#to_paramString

to_param should return a nice-readable representation of the key suitable to chuck into URLs

Returns:

  • (String)

    a nice readable representation of the key suitable for URLs



11
# File 'lib/cassandra_object/identity/key.rb', line 11

def to_param; end

#to_sString

to_s should return the bytes which will be written to cassandra both as keys and values for associations.

Returns:

  • (String)

    the bytes which will be written to cassandra as keys



16
# File 'lib/cassandra_object/identity/key.rb', line 16

def to_s; end