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
2010-11-05 14:09:09 -07:00

27 lines
435 B
Ruby

module Arel
class TreeManager
# FIXME: Remove this.
include Arel::Relation
attr_accessor :visitor
attr_reader :ast
def initialize engine
@engine = engine
@visitor = Visitors.visitor_for @engine
end
def to_dot
Visitors::Dot.new.accept @ast
end
def to_sql
@visitor.accept @ast
end
def initialize_copy other
super
@ast = @ast.clone
end
end
end