Sha256: 9cab0bf3bd13f6113062a37d0f87fc083dda32c101b026a9e052c9158f9178f3
Contents?: true
Size: 690 Bytes
Versions: 14
Compression:
Stored size: 690 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 end end end
Version data entries
14 entries across 14 versions & 1 rubygems