class RuboCop::Cop::Style::StringLiterals

def on_dstr(node)

def on_dstr(node)
  # Strings which are continued across multiple lines using \
  # are parsed as a `dstr` node with `str` children
  # If one part of that continued string contains interpolations,
  # then it will be parsed as a nested `dstr` node
  return unless consistent_multiline?
  return if node.loc.is_a?(Parser::Source::Map::Heredoc)
  children = node.children
  return unless all_string_literals?(children)
  quote_styles = detect_quote_styles(node)
  if quote_styles.size > 1
    add_offense(node, :expression, MSG_INCONSISTENT)
  else
    check_multiline_quote_style(node, quote_styles[0])
  end
  ignore_node(node)
end