rgviz-rails 0.29 → 0.30

Sign up to get free protection for your applications and to get access to all the features.
@@ -456,12 +456,20 @@ module Rgviz
456
456
  end
457
457
 
458
458
  class WhereVisitor < ColumnVisitor
459
- def visit_binary_expression(node)
459
+ def visit_logical_expression(node)
460
460
  @string += "("
461
+ node.operands.each_with_index do |operand, i|
462
+ @string += " #{node.operator} " if i > 0
463
+ operand.accept self
464
+ end
465
+ @string += ")"
466
+ false
467
+ end
468
+
469
+ def visit_binary_expression(node)
461
470
  node.left.accept self
462
471
  @string += " #{node.operator} "
463
472
  node.right.accept self
464
- @string += ")"
465
473
  false
466
474
  end
467
475
 
@@ -320,6 +320,16 @@ module Rgviz
320
320
  false
321
321
  end
322
322
 
323
+ def visit_logical_expression(node)
324
+ @s += "("
325
+ node.operands.each_with_index do |operand, i|
326
+ @s += " #{node.operator} " if i > 0
327
+ operand.accept self
328
+ end
329
+ @s += ")"
330
+ false
331
+ end
332
+
323
333
  def visit_binary_expression(node)
324
334
  if node.operator == BinaryExpression::Eq
325
335
  source = has_magic_name?(node.right)
metadata CHANGED
@@ -1,12 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rgviz-rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 49
4
+ hash: 55
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 29
9
- version: "0.29"
8
+ - 30
9
+ version: "0.30"
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ary Borenszweig