module RoadForest::Graph::Helpers::Focus

Public Instance Methods

start_focus(graph = nil, resource_url=nil) { |focus| ... } click to toggle source
# File lib/roadforest/interface/rdf.rb, line 9
def start_focus(graph = nil, resource_url=nil)
  graph ||= ::RDF::Graph.new
  access = RoadForest::Graph::WriteManager.new
  access.source_graph = graph
  focus = RoadForest::Graph::GraphFocus.new(access, resource_url || my_url)

  yield focus if block_given?
  return graph
end