Class: LinkedRails::Types::IRI
- Inherits:
-
ActiveRecord::Type::Value
- Object
- ActiveRecord::Type::Value
- LinkedRails::Types::IRI
- Defined in:
- lib/linked_rails/types/iri_type.rb
Instance Method Summary collapse
Instance Method Details
#cast(value) ⇒ Object
10 11 12 |
# File 'lib/linked_rails/types/iri_type.rb', line 10 def cast(value) RDF::URI(value) if value.present? end |
#serialize(value) ⇒ Object
14 15 16 |
# File 'lib/linked_rails/types/iri_type.rb', line 14 def serialize(value) value.to_s end |
#type ⇒ Object
6 7 8 |
# File 'lib/linked_rails/types/iri_type.rb', line 6 def type :string end |