Class: RDF::Graph

Inherits:
Object
  • Object
show all
Defined in:
lib/sasquatch/rdf.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#requested_resourceObject (readonly)

Returns the value of attribute requested_resource.



11
12
13
# File 'lib/sasquatch/rdf.rb', line 11

def requested_resource
  @requested_resource
end

Instance Method Details

#set_requested_resource(uri) ⇒ Object



19
20
21
# File 'lib/sasquatch/rdf.rb', line 19

def set_requested_resource(uri)
  @requested_resource = uri
end

#to_ntriplesObject



12
13
14
15
16
17
18
# File 'lib/sasquatch/rdf.rb', line 12

def to_ntriples
  RDF::Writer.for(:ntriples).buffer do |writer|
    self.statements.each do |statement|
      writer << statement
    end
  end      
end