Sha256: ff8c9436a57b4233ee90d8c59f916176f1adba63d8bf7ad572a4e3593d335143
Contents?: true
Size: 849 Bytes
Versions: 126
Compression:
Stored size: 849 Bytes
Contents
module CassandraObject module Identity class CustomKeyFactory < AbstractKeyFactory class CustomKey include Key attr_reader :value def initialize(value) @value = value end def to_s value end def to_param value end def ==(other) other.is_a?(CustomKey) && other.value == value end def eql?(other) other == self end end attr_reader :method def initialize(options) @method = options[:method] end def next_key(object) CustomKey.new(object.send(@method)) end def parse(paramized_key) CustomKey.new(paramized_key) end def create(paramized_key) CustomKey.new(paramized_key) end end end end
Version data entries
126 entries across 126 versions & 2 rubygems