class RuboCop::Cop::Style::FormatStringToken
def on_str(node)
def on_str(node) return if placeholder_argument?(node) return if node.each_ancestor(:xstr, :regexp).any? tokens(node) do |detected_style, token_range| if detected_style == style || unannotated_format?(node, detected_style) correct_style_detected else style_detected(detected_style) add_offense(node, location: token_range, message: message(detected_style)) end end end