1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/lib/arel/tree_manager.rb

25 lines
378 B
Ruby
Raw Normal View History

2010-08-12 19:19:54 -04:00
module Arel
class TreeManager
2010-08-13 15:26:06 -04:00
# FIXME: Remove this.
include Arel::Relation
2010-08-12 19:19:54 -04:00
def initialize engine
@engine = engine
2010-08-12 19:19:54 -04:00
end
def to_dot
Visitors::Dot.new.accept @head
end
2010-08-12 19:19:54 -04:00
def to_sql
viz = Visitors::ToSql.new @engine
viz.accept @head
2010-08-12 19:19:54 -04:00
end
def initialize_copy other
super
@head = @head.clone
end
2010-08-12 19:19:54 -04:00
end
end