Module: Tripod::Resource::ClassMethods
- Defined in:
- lib/tripod/resource.rb
Instance Method Summary collapse
-
#===(other) ⇒ Object
Performs class equality checking.
- #graph_uri(new_graph_uri) ⇒ Object
-
#rdf_type(new_rdf_type) ⇒ Object
makes a “field” on this model called rdf_type and sets a class level _RDF_TYPE variable with the rdf_type passed in.
Instance Method Details
#===(other) ⇒ Object
Performs class equality checking.
91 92 93 |
# File 'lib/tripod/resource.rb', line 91 def ===(other) other.class == Class ? self <= other : other.is_a?(self) end |
#graph_uri(new_graph_uri) ⇒ Object
102 103 104 |
# File 'lib/tripod/resource.rb', line 102 def graph_uri(new_graph_uri) self._GRAPH_URI = new_graph_uri end |
#rdf_type(new_rdf_type) ⇒ Object
makes a “field” on this model called rdf_type and sets a class level _RDF_TYPE variable with the rdf_type passed in.
97 98 99 100 |
# File 'lib/tripod/resource.rb', line 97 def rdf_type(new_rdf_type) self._RDF_TYPE = RDF::URI.new(new_rdf_type.to_s) field :rdf_type, RDF.type, :multivalued => true # things can have more than 1 type and often do end |