class RuboCop::Cop::Style::FormatStringToken

def on_str(node)

def on_str(node)
  return if node.each_ancestor(:xstr).any?
  tokens(node) do |detected_style, token_range|
    if detected_style == style
      correct_style_detected
    else
      style_detected(detected_style)
      add_offense(node, token_range, message(detected_style))
    end
  end
end