Class: Sod::Graph::Loader
- Inherits:
-
Object
- Object
- Sod::Graph::Loader
- Defined in:
- lib/sod/graph/loader.rb
Overview
Loads and decorates option parsers within graph.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(graph) ⇒ Loader
constructor
A new instance of Loader.
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
#call ⇒ Object
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 |