Module: RDF::Resource
Overview
An RDF resource.
Class Method Summary collapse
Instance Method Summary collapse
-
#resource? ⇒ Boolean
Returns ‘true` to indicate that this value is a resource.
Methods included from Term
#<=>, #==, #constant?, #eql?, #variable?
Methods included from Value
#graph?, #inspect, #inspect!, #iri?, #literal?, #node?, #statement?, #to_ntriples, #to_quad, #to_rdf, #type_error, #uri?, #variable?
Class Method Details
.new(*args, &block) ⇒ RDF::Resource
12 13 14 15 16 17 18 |
# 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 |
Instance Method Details
#resource? ⇒ Boolean
Returns ‘true` to indicate that this value is a resource.
24 25 26 |
# File 'lib/rdf/model/resource.rb', line 24 def resource? true end |