module Gearbox::Type::ClassMethods
Public Instance Methods
register_alias(any)
click to toggle source
Register an alias that this type can be referred to as, such as an RDF URI. The alias can be any object, symbol, or constant.
@param [Any] identifier The new alias in property declarations for this class @return [Void]
# File lib/gearbox/type.rb, line 61 def register_alias(any) Gearbox.type_alias(any, self) end
serialize(value)
click to toggle source
Serialize a given value to RDF.
@param [Any] value The Ruby value to be serialized @return [RDF::Value] The RDF form of this value
# File lib/gearbox/type.rb, line 70 def serialize(value) value end
unserialize(value)
click to toggle source
Unserialize a given RDF value to Ruby
@param [RDF::Value] value The RDF form of this value @return [Any] The Ruby form of this value
# File lib/gearbox/type.rb, line 79 def unserialize(value) value end