Class: Arel::Visitors::Dot

Inherits:
Visitor show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/visitors/dot.rb

Defined Under Namespace

Classes: Edge, Node

Instance Method Summary collapse

Constructor Details

#initializeDot

Returns a new instance of Dot.



19
20
21
22
23
24
25
26
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/visitors/dot.rb', line 19

def initialize
  super()
  @nodes      = []
  @edges      = []
  @node_stack = []
  @edge_stack = []
  @seen       = {}
end

Instance Method Details

#accept(object, collector) ⇒ Object



28
29
30
31
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/arel/visitors/dot.rb', line 28

def accept(object, collector)
  visit object
  collector << to_dot
end