Class: Tengine::Job::Vertex::AllVisitorWithEdge

Inherits:
AllVisitor
  • Object
show all
Defined in:
lib/tengine/job/vertex.rb

Instance Method Summary collapse

Methods inherited from AllVisitor

#initialize

Constructor Details

This class inherits a constructor from Tengine::Job::Vertex::AllVisitor

Instance Method Details

#visit(obj) ⇒ Object



170
171
172
173
174
175
176
177
178
# File 'lib/tengine/job/vertex.rb', line 170

def visit(obj)
  if obj.respond_to?(:children)
    super(obj)
  else
    @block.call(obj)
  end
  return unless obj.respond_to?(:edges)
  obj.edges.each{|edge| edge.accept_visitor(self)}
end