Class: LogicalConstruct::ResolutionServer::Models::ServerManifest

Inherits:
RoadForest::RDFModel
  • Object
show all
Defined in:
lib/logical-construct/target/resolution-server.rb

Instance Method Summary collapse

Instance Method Details

#fill_graph(graph) ⇒ Object



70
71
72
73
74
75
76
# File 'lib/logical-construct/target/resolution-server.rb', line 70

def fill_graph(graph)
  graph.add_list(:lc, "plans") do |list|
    services.plan_records.each do |record|
      list << path_for(:plan, '*' => record.name)
    end
  end
end

#graph_update(graph) ⇒ Object



78
79
80
81
82
83
84
85
86
# File 'lib/logical-construct/target/resolution-server.rb', line 78

def graph_update(graph)
  services.plan_records.reset!

  graph[:lc, "plans"].as_list.each do |plan|
    services.plan_records.add(plan.first(:lc, "name"), plan.first(:lc, "digest"))
  end

  new_graph
end