<commit_before># frozen_string_literal: true

class ReviewDecorator < ApplicationDecorator
  def detail_link(options = {})
    title = options.delete(:title).presence || self.title
    path = h.review_path(user.username, self)
    h.link_to title, path, options
  end

  def detail_url
    h.review_url(user.username, self)
  end

  def tweet_body
    work_title = work.title
    share_url = h.review_url(user.username, self)
    share_hashtag = review.work.hashtag_with_hash
    review_title = title<commit_msg>Fix review detail URL<commit_after># frozen_string_literal: true

class ReviewDecorator < ApplicationDecorator
  def detail_link(options = {})
    title = options.delete(:title).presence || self.title
    path = h.review_path(user.username, self)
    h.link_to title, path, options
  end

  def detail_url
    "#{ENV.fetch('ANNICT_URL')}#{h.review_path(user.username, self)}"
  end

  def tweet_body
    work_title = work.title
    share_url = detail_url
    share_hashtag = review.work.hashtag_with_hash
    review_title = title
{'fraction_non_alphanumeric': 0.09606147934678194, 'fraction_numerical': 0.0, 'mean_word_length': 4.058252427184466, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1863932', 'n_tokens_mistral': 350, 'n_tokens_neox': 347, 'n_words': 71}