Class: ActiveTriples::Schema

Inherits:
Object
  • Object
show all
Defined in:
lib/active_triples/schema.rb

Overview

Super class which provides a simple property DSL for defining property -> predicate mappings.

Class Method Summary collapse

Class Method Details

.propertiesObject



15
16
17
# File 'lib/active_triples/schema.rb', line 15

def properties
  @properties ||= []
end

.property(property, options) ⇒ Object

Options Hash (options):

  • :predicate (RDF::URI)

    The predicate to map the property to.



11
12
13
# File 'lib/active_triples/schema.rb', line 11

def property(property, options)
  properties << Property.new(options.merge(:name => property))
end