class Ardm::Property::Object
Public Instance Methods
dump(value)
click to toggle source
@api semipublic
# File lib/ardm/property/object.rb, line 11 def dump(value) instance_of?(Object) ? marshal(value) : value end
load(value)
click to toggle source
@api semipublic
# File lib/ardm/property/object.rb, line 16 def load(value) typecast(instance_of?(Object) ? unmarshal(value) : value) end
marshal(value)
click to toggle source
@api semipublic
# File lib/ardm/property/object.rb, line 21 def marshal(value) [ Marshal.dump(value) ].pack('m') unless value.nil? end
to_child_key()
click to toggle source
@api private
# File lib/ardm/property/object.rb, line 31 def to_child_key self.class end
unmarshal(value)
click to toggle source
@api semipublic
# File lib/ardm/property/object.rb, line 26 def unmarshal(value) Marshal.load(value.unpack('m').first) unless value.nil? end