class RuboCop::AST::ArrayNode
def percent_literal?(type = nil)
-
(Boolean)
- whether the array is enclosed in percent brackets
Parameters:
-
type
(Symbol
) -- an optional percent literal type
Overloads:
-
percent_literal?(type)
-
percent_literal?
def percent_literal?(type = nil) if type loc.begin && loc.begin.source =~ PERCENT_LITERAL_TYPES[type] else loc.begin&.source&.start_with?('%') end end