lib/arel/extensions/select_manager.rb in arel_toolkit-0.3.0 vs lib/arel/extensions/select_manager.rb in arel_toolkit-0.4.0

- old
+ new

@@ -1,9 +1,25 @@ -Arel::SelectManager.class_eval do - def ==(other) - @ast == other.ast && @ctx == other.ctx - end +# rubocop:disable Naming/MethodName +# rubocop:disable Naming/UncommunicativeMethodParamName - protected +module Arel + class SelectManager + def ==(other) + other.is_a?(self.class) && @ast == other.ast && @ctx == other.ctx + end - attr_reader :ctx + protected + + attr_reader :ctx + end + + module Visitors + class Dot + def visit_Arel_SelectManager(o) + visit_edge(o, 'ast') + end + end + end end + +# rubocop:enable Naming/MethodName +# rubocop:enable Naming/UncommunicativeMethodParamName