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&.source&.match?(PERCENT_LITERAL_TYPES.fetch(type)) else loc.begin&.source&.start_with?('%') end end