Class: CassandraObject::Identity::HashedNaturalKeyFactory
- Inherits:
-
NaturalKeyFactory
- Object
- AbstractKeyFactory
- NaturalKeyFactory
- CassandraObject::Identity::HashedNaturalKeyFactory
- Defined in:
- lib/cassandra_object/identity/hashed_natural_key_factory.rb
Instance Attribute Summary
Attributes inherited from NaturalKeyFactory
Instance Method Summary collapse
Methods inherited from NaturalKeyFactory
Methods inherited from AbstractKeyFactory
Constructor Details
This class inherits a constructor from CassandraObject::Identity::NaturalKeyFactory
Instance Method Details
#next_key(object) ⇒ Object
5 6 7 |
# File 'lib/cassandra_object/identity/hashed_natural_key_factory.rb', line 5 def next_key(object) NaturalKey.new(Digest::SHA1.hexdigest(attributes.map { |a| object.attributes[a.to_s] }.join(separator))) end |