module RDF::Resource
An RDF resource.
Public Class Methods
new(*args, &block)
click to toggle source
Instantiates an {RDF::Node} or an {RDF::URI}, depending on the given argument.
@return [RDF::Resource]
# File lib/rdf/model/resource.rb, line 12 def self.new(*args, &block) case arg = args.shift when Symbol then Node.intern(arg, *args, &block) when /^_:(.*)$/ then Node.new($1, *args, &block) else URI.new(arg, *args, &block) end end
Public Instance Methods
resource?()
click to toggle source
Returns `true` to indicate that this value is a resource.
@return [Boolean]
# File lib/rdf/model/resource.rb, line 24 def resource? true end