class RuboCop::AST::ArrayNode

def square_brackets?

Returns:
  • (Boolean) - whether the array is enclosed in square brackets
def square_brackets?
  loc.begin&.is?('[')
end