module RDF::RDFObjects::AssertionSet
Attributes
subject[R]
vocabulary[R]
Public Instance Methods
[](key)
click to toggle source
# File lib/rdf/rdfobjects/assertion_set.rb, line 19 def [](key) if self.keys.index(key.to_s) @subject[key] else send(:set_property, key, nil) end end
method_missing(meth, *args)
click to toggle source
# File lib/rdf/rdfobjects/assertion_set.rb, line 11 def method_missing(meth, *args) if meth.to_s =~ /\=$/ send(:set_property, @vocabulary.send(meth.to_s.sub(/\=$/,'').to_sym), args) elsif prop = @vocabulary.send(meth) send(:"[]", prop) end end
set_property(p, args)
click to toggle source
# File lib/rdf/rdfobjects/assertion_set.rb, line 26 def set_property(p, args) @subject[p] = args @subject[p] end
subject=(s)
click to toggle source
# File lib/rdf/rdfobjects/assertion_set.rb, line 7 def subject=(s) @subject=s end
vocabulary=(v)
click to toggle source
# File lib/rdf/rdfobjects/assertion_set.rb, line 4 def vocabulary=(v) @vocabulary = v end