<commit_before>class GuidePresenter
  def initialize(guide, edition)
    @guide = guide
    @edition = edition
  end

  def content_id
    guide.content_id
  end

  def content_payload
    {
      publishing_app: "service-manual-publisher",
      rendering_app: "service-manual-frontend",
      format: "service_manual_guide",
      locale: "en",
      update_type: edition.update_type,
      base_path: guide.slug,
      title: edition.title,
      description: edition.description,
      phase: edition.phase,
      routes: [
        { type: "exact", path: guide.slug }
      ],
      details: details
    }
  end

  def links_payload
    links = {
      organisations: [ServiceManualPublisher::GDS_ORGANISATION_CONTENT_ID],
    }

    if edition.content_owner
      links[:content_owners] = [edition.content_owner.content_id]
    end

    if guide.is_a?(Point)
      links[:parent] = [ServiceStandardPresenter::SERVICE_STANDARD_CONTENT_ID]
    end

    { links: links }
  end

private

  attr_reader :guide, :edition

  def details
    details_hash = {
      body: govspeak_body.to_html,
      header_links: level_two_headers,
      change_history: GuidePresenter::ChangeHistoryPresenter.new(guide, edition).change_history
    }<commit_msg>Remove unnecessary namespace from guide_presenter<commit_after>class GuidePresenter
  def initialize(guide, edition)
    @guide = guide
    @edition = edition
  end

  def content_id
    guide.content_id
  end

  def content_payload
    {
      publishing_app: "service-manual-publisher",
      rendering_app: "service-manual-frontend",
      format: "service_manual_guide",
      locale: "en",
      update_type: edition.update_type,
      base_path: guide.slug,
      title: edition.title,
      description: edition.description,
      phase: edition.phase,
      routes: [
        { type: "exact", path: guide.slug }
      ],
      details: details
    }
  end

  def links_payload
    links = {
      organisations: [ServiceManualPublisher::GDS_ORGANISATION_CONTENT_ID],
    }

    if edition.content_owner
      links[:content_owners] = [edition.content_owner.content_id]
    end

    if guide.is_a?(Point)
      links[:parent] = [ServiceStandardPresenter::SERVICE_STANDARD_CONTENT_ID]
    end

    { links: links }
  end

private

  attr_reader :guide, :edition

  def details
    details_hash = {
      body: govspeak_body.to_html,
      header_links: level_two_headers,
      change_history: ChangeHistoryPresenter.new(guide, edition).change_history
    }
{'fraction_non_alphanumeric': 0.0893854748603352, 'fraction_numerical': 0.0, 'mean_word_length': 3.0112, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5195407', 'n_tokens_mistral': 810, 'n_tokens_neox': 782, 'n_words': 152}