<commit_before>class Committee
  include Mongoid::Document
  include Mongoid::Timestamps
  include Versioning

  field :type, type: Symbol
  field :chairperson_id, type: Integer
  field :member_ids, type: Array

  def members
    Member.where(leo_id: self.leo_id)
  end

  def chairperson
    Member.where(leo_id: self.chairperson_id).first
  end
end<commit_msg>add members function to committee<commit_after>class Committee
  include Mongoid::Document
  include Mongoid::Timestamps
  include Versioning

  field :type, type: Symbol
  field :chairperson_id, type: Integer
  field :member_ids, type: Array, default: []

  def members
    Member.where(:leo_id.in => (member_ids + [chairperson_id]))
  end

  def chairperson
    Member.where(leo_id: self.chairperson_id).first
  end
end
{'fraction_non_alphanumeric': 0.08301404853128991, 'fraction_numerical': 0.0, 'mean_word_length': 4.52112676056338, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '7184685', 'n_tokens_mistral': 255, 'n_tokens_neox': 248, 'n_words': 67}