Module: RuboCop::AST::BinaryOperatorNode

Included in:
AndNode, OrNode
Defined in:
lib/rubocop/ast/node/mixin/binary_operator_node.rb

Overview

Common functionality for nodes that are binary operations: ‘or`, `and` …

Instance Method Summary collapse

Instance Method Details

#lhsNode

Returns the left hand side node of the binary operation.

Returns:

  • (Node)

    the left hand side of the binary operation



11
12
13
# File 'lib/rubocop/ast/node/mixin/binary_operator_node.rb', line 11

def lhs
  node_parts[0]
end

#rhsNode

Returns the right hand side node of the binary operation.

Returns:

  • (Node)

    the right hand side of the binary operation



18
19
20
# File 'lib/rubocop/ast/node/mixin/binary_operator_node.rb', line 18

def rhs
  node_parts[1]
end