Sha256: fa093a1665be669f12b1e108b67ccf1611f65df3d266bdb4155425c4d58cbae8

Contents?: true

Size: 567 Bytes

Versions: 10

Compression:

Stored size: 567 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module AST
    # Common functionality for nodes that are binary operations:
    # `or`, `and` ...
    module BinaryOperatorNode
      # Returns the left hand side node of the binary operation.
      #
      # @return [Node] the left hand side of the binary operation
      def lhs
        node_parts[0]
      end

      # Returns the right hand side node of the binary operation.
      #
      # @return [Node] the right hand side of the binary operation
      def rhs
        node_parts[1]
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rubocop-0.54.0 lib/rubocop/ast/node/mixin/binary_operator_node.rb
rubocop-0.53.0 lib/rubocop/ast/node/mixin/binary_operator_node.rb
rubocop-0.52.1 lib/rubocop/ast/node/mixin/binary_operator_node.rb
rubocop-0.52.0 lib/rubocop/ast/node/mixin/binary_operator_node.rb
rubocop-0.51.0 lib/rubocop/ast/node/mixin/binary_operator_node.rb
rubocop-0.50.0 lib/rubocop/ast/node/mixin/binary_operator_node.rb
rubocop-0.49.1 lib/rubocop/ast/node/mixin/binary_operator_node.rb
rubocop-0.49.0 lib/rubocop/ast/node/mixin/binary_operator_node.rb
rubocop-0.48.1 lib/rubocop/ast/node/mixin/binary_operator_node.rb
rubocop-0.48.0 lib/rubocop/ast/node/mixin/binary_operator_node.rb