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

- old
+ new

@@ -1,28 +1,19 @@ # rubocop:disable Naming/MethodName # rubocop:disable Naming/UncommunicativeMethodParamName module Arel module Nodes - class Indirection < Arel::Nodes::Node - attr_reader :arg - attr_reader :indirection - - def initialize(arg, indirection) - super() - - @arg = arg - @indirection = indirection - end + class Indirection < Arel::Nodes::Binary end end module Visitors class ToSql def visit_Arel_Nodes_Indirection(o, collector) - visit(o.arg, collector) + visit(o.left, collector) collector << '[' - visit(o.indirection, collector) + visit(o.right, collector) collector << ']' end end end end