Module: ActiveTriples::Properties

Extended by:
ActiveSupport::Concern
Included in:
List, RDFSource
Defined in:
lib/active_triples/properties.rb

Overview

Implements property configuration in the style of RDFSource. It does its work at the class level, and is meant to be extended.

Collaborates closely with ActiveTriples::Reflection

Examples:

define properties at the class level


property :title, predicate: RDF::DC.title, class_name: ResourceClass

using property setters & getters

resource.property :title, predicate: RDF::DC.title, 
                          class_name: ResourceClass

resource.title = 'Comet in Moominland'

resource.title                # => ['Comet in Moominland']
resource.title(literal: true) # => [RDF::Literal('Comet in Moominland')]

See Also:

  • {ActiveTriples{ActiveTriples::Reflection}
  • {ActiveTriples{ActiveTriples::PropertyBuilder}

Defined Under Namespace

Modules: ClassMethods