Class: SketchUpYARD::Stubs::AutoLoadGenerator::NodeFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/yard-sketchup/stubs/autoload.rb

Instance Method Summary collapse

Constructor Details

#initializeNodeFactory

Returns a new instance of NodeFactory.



61
62
63
# File 'lib/yard-sketchup/stubs/autoload.rb', line 61

def initialize
  @dependencies = {}
end

Instance Method Details

#node(yard_object) ⇒ Object



65
66
67
68
69
70
71
# File 'lib/yard-sketchup/stubs/autoload.rb', line 65

def node(yard_object)
  item = @dependencies[yard_object.path]
  return item if item
  item = Node.new(yard_object)
  @dependencies[yard_object.path] = item
  item
end