Module: Gearbox::Type::ClassMethods
- Defined in:
- lib/gearbox/type.rb
Instance Method Summary collapse
-
#register_alias(any) ⇒ Void
Register an alias that this type can be referred to as, such as an RDF URI.
-
#serialize(value) ⇒ RDF::Value
Serialize a given value to RDF.
-
#unserialize(value) ⇒ Any
Unserialize a given RDF value to Ruby.
Instance Method Details
#register_alias(any) ⇒ Void
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.
61 62 63 |
# File 'lib/gearbox/type.rb', line 61 def register_alias(any) Gearbox.type_alias(any, self) end |
#serialize(value) ⇒ RDF::Value
Serialize a given value to RDF.
70 71 72 |
# File 'lib/gearbox/type.rb', line 70 def serialize(value) value end |
#unserialize(value) ⇒ Any
Unserialize a given RDF value to Ruby
79 80 81 |
# File 'lib/gearbox/type.rb', line 79 def unserialize(value) value end |