mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
24 lines
378 B
Ruby
24 lines
378 B
Ruby
module Arel
|
|
class TreeManager
|
|
# FIXME: Remove this.
|
|
include Arel::Relation
|
|
|
|
def initialize engine
|
|
@engine = engine
|
|
end
|
|
|
|
def to_dot
|
|
Visitors::Dot.new.accept @head
|
|
end
|
|
|
|
def to_sql
|
|
viz = Visitors::ToSql.new @engine
|
|
viz.accept @head
|
|
end
|
|
|
|
def initialize_copy other
|
|
super
|
|
@head = @head.clone
|
|
end
|
|
end
|
|
end
|