Method: RDF::Query#apply_graph_name

Defined in:
lib/rdf/query.rb

#apply_graph_name(graph_name = nil) ⇒ Object

Apply the graph name specified (or configured) to all patterns that have no graph name

Parameters:

Since:

  • 0.3.0



433
434
435
436
# File 'lib/rdf/query.rb', line 433

def apply_graph_name(graph_name = nil)
  graph_name ||= self.graph_name
  patterns.each {|pattern| pattern.graph_name = graph_name if pattern.graph_name.nil?} unless graph_name.nil?
end