class RuboCop::AST::Node

def left_sibling

Returns:
  • (Node, nil) - the left (aka previous) sibling
def left_sibling
  i = sibling_index
  return if i.nil? || i.zero?
  parent.children[i - 1].freeze
end