<commit_before>class SearchPresenter
  delegate :title, to: :document

  def initialize(document)
    @document = document
  end

  def to_json
    {
      title: document.title,
      description: document.summary,
      link: document.base_path,
      indexable_content: indexable_content,
      public_timestamp: document.public_updated_at.to_datetime.rfc3339,
    }.merge(document.format_specific_metadata).reject { |_k, v| v.blank? }
  end

  def indexable_content
    Govspeak::Document.new(document.body).to_text
  end

private

  attr_reader :document

  def publishing_api
    @publishing_api ||= Services.publishing_api
  end
end<commit_msg>Get rid of unused instance variable<commit_after>class SearchPresenter
  delegate :title, to: :document

  def initialize(document)
    @document = document
  end

  def to_json
    {
      title: document.title,
      description: document.summary,
      link: document.base_path,
      indexable_content: indexable_content,
      public_timestamp: document.public_updated_at.to_datetime.rfc3339,
    }.merge(document.format_specific_metadata).reject { |_k, v| v.blank? }
  end

  def indexable_content
    Govspeak::Document.new(document.body).to_text
  end

private

  attr_reader :document
end
{'fraction_non_alphanumeric': 0.08253205128205128, 'fraction_numerical': 0.00641025641025641, 'mean_word_length': 3.8038461538461537, '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': '7038810', 'n_tokens_mistral': 399, 'n_tokens_neox': 383, 'n_words': 81}