Class: Sod::Graph::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/sod/graph/loader.rb

Overview

Loads and decorates option parsers within graph.

Instance Method Summary collapse

Constructor Details

#initialize(graph) ⇒ Loader

Returns a new instance of Loader.



11
12
13
14
15
# File 'lib/sod/graph/loader.rb', line 11

def initialize(graph, **)
  super(**)
  @graph = graph
  @registry = {}
end

Instance Method Details

#callObject



17
18
19
20
21
22
# File 'lib/sod/graph/loader.rb', line 17

def call
  registry.clear
  load graph
  graph.children.each { |child| visit child, child.handle }
  registry
end