Class: ActiveTriples::Resource

Inherits:
Object
  • Object
show all
Includes:
RDFSource
Defined in:
lib/active_triples/resource.rb

Overview

Defines a generic RDF ‘Resource` as an `ActiveTriples::Entity`. This provides a basic `Entity` type for classless resources.

Instance Attribute Summary

Attributes included from RDFSource

#parent

Class Method Summary collapse

Methods included from RDFSource

#[], #[]=, #attributes, #attributes=, #base_uri, #destroy, #destroy_child, #destroyed?, #dump, #fetch, #fields, #final_parent, #get_relation, #get_values, #id, #initialize, #mark_for_destruction, #marked_for_destruction?, #new_record?, #node?, #persist!, #persisted?, #rdf_label, #rdf_subject, #reflections, #reload, #serializable_hash, #set_subject!, #set_value, #type, #type=, #writable?

Methods included from Reflection

add_reflection

Class Method Details

.propertyObject



15
16
17
18
19
# File 'lib/active_triples/resource.rb', line 15

def property(*)
  raise "Properties not definable directly on ActiveTriples::Resource, use a subclass" if
    self == ActiveTriples::Resource
  super
end

.type_registryObject



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

def type_registry
  RDFSource.type_registry
end