module RDF
Public Class Methods
Graph(*args, &block)
click to toggle source
Alias for ‘RDF::Graph.new`.
@return [RDF::Graph]
# File lib/rdf/threadsafe.rb, line 54 def self.Graph(*args, &block) Graph.new(*args, &block) end
Literal(*args, &block)
click to toggle source
Alias for ‘RDF::Literal.new`.
@return [RDF::Literal]
# File lib/rdf/threadsafe.rb, line 43 def self.Literal(*args, &block) case literal = args.first when RDF::Literal then literal else Literal.new(*args, &block) end end
Node(*args, &block)
click to toggle source
Alias for ‘RDF::Node.new`.
@return [RDF::Node]
# File lib/rdf/threadsafe.rb, line 15 def self.Node(*args, &block) Node.new(*args, &block) end
Resource(*args, &block)
click to toggle source
Alias for ‘RDF::Resource.new`.
@return [RDF::Resource]
# File lib/rdf/threadsafe.rb, line 7 def self.Resource(*args, &block) Resource.new(*args, &block) end
Statement(*args, &block)
click to toggle source
Alias for ‘RDF::Statement.new`.
@return [RDF::Statement]
# File lib/rdf/threadsafe.rb, line 62 def self.Statement(*args, &block) Statement.new(*args, &block) end
URI(*args, &block)
click to toggle source
Alias for ‘RDF::URI.new`.
@overload URI(uri)
@param [URI, String, #to_s] uri
@overload URI(options = {})
@param [Hash{Symbol => Object} options
@return [RDF::URI]
# File lib/rdf/threadsafe.rb, line 29 def self.URI(*args, &block) case uri = args.first when RDF::URI then uri else case when uri.respond_to?(:to_uri) then uri.to_uri else URI.new(*args, &block) end end end
Vocabulary(uri)
click to toggle source
Alias for ‘RDF::Vocabulary.create`.
@param [String] uri @return [Class]
# File lib/rdf/threadsafe.rb, line 71 def self.Vocabulary(uri) Vocabulary.create(uri) end
[](property)
click to toggle source
@return [#to_s] property @return [URI]
# File lib/rdf/threadsafe.rb, line 84 def self.[](property) RDF::URI.intern([to_uri.to_s, property.to_s].join) end
method_missing(property, *args, &block)
click to toggle source
@param [Symbol] property @return [URI] @raise [NoMethodError]
Calls superclass method
# File lib/rdf/threadsafe.rb, line 92 def self.method_missing(property, *args, &block) if args.empty? self[property] else super end end
to_rdf()
click to toggle source
@return [URI]
# File lib/rdf/threadsafe.rb, line 102 def self.to_rdf to_uri end
to_uri()
click to toggle source
@return [URI]
# File lib/rdf/threadsafe.rb, line 108 def self.to_uri RDF::URI.intern("http://www.w3.org/1999/02/22-rdf-syntax-ns#") end
type()
click to toggle source
@return [URI]
# File lib/rdf/threadsafe.rb, line 77 def self.type self[:type] end