<commit_before>class StaffPositionDrop < Liquid::Drop
  attr_reader :staff_position
  delegate :id, :name, :email, to: :staff_position

  def initialize(staff_position)
    @staff_position = staff_position
  end

  def user_con_profiles
    staff_position.user_con_profiles.to_a
  end
end<commit_msg>Add new Liquid methods for generating staff email links (#503)<commit_after>class StaffPositionDrop < Liquid::Drop
  include ActionView::Helpers::UrlHelper

  attr_reader :staff_position
  delegate :id, :name, :email, to: :staff_position

  def initialize(staff_position)
    @staff_position = staff_position
  end

  def user_con_profiles
    staff_position.user_con_profiles.to_a
  end

  def email_link
    return unless email.present?
    mail_to email
  end

  def name_with_email_link
    if email.present?
      mail_to email, name
    else
      name
    end
  end
end
{'fraction_non_alphanumeric': 0.06164383561643835, 'fraction_numerical': 0.003424657534246575, 'mean_word_length': 4.158823529411765, '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': '4924621', 'n_tokens_mistral': 288, 'n_tokens_neox': 271, 'n_words': 71}