Sha256: 2065d8e76246852f7a80df82e0f5212a3bdd346cf97429520ffe18bacecdaea9
Contents?: true
Size: 896 Bytes
Versions: 56
Compression:
Stored size: 896 Bytes
Contents
module CassandraObject module Identity # Key factories need to support 3 operations class AbstractKeyFactory # Next key takes an object and returns the key object it should use. # object will be ignored with synthetic keys but could be useful with natural ones # # @param [CassandraObject::Base] the object that needs a new key # @return [CassandraObject::Identity::Key] the key # def next_key(object) raise NotImplementedError, "#{self.class.name}#next_key isn't implemented." end # Parse should create a new key object from the 'to_param' format # # @param [String] the result of calling key.to_param # @return [CassandraObject::Identity::Key] the parsed key # def parse(string) raise NotImplementedError, "#{self.class.name}#parse isn't implemented." end end end end
Version data entries
56 entries across 56 versions & 1 rubygems