Sha256: becc6524c78d4ac7dcebb7f48c296e15d22462a41e71397933fef8dea9114540
Contents?: true
Size: 527 Bytes
Versions: 10
Compression:
Stored size: 527 Bytes
Contents
module CassandraObject module AttributeMethods class Definition attr_reader :name, :coder def initialize(name, coder, options) @name = name.to_s @coder = coder.new(options) end def default coder.default end def instantiate(record, value) value = value.nil? ? coder.default : value return if value.nil? value = value.kind_of?(String) ? coder.decode(value) : value coder.wrap(record, name, value) end end end end
Version data entries
10 entries across 10 versions & 1 rubygems