<commit_before># == Schema Information
#
# Table name: live_raids
#
#  id         :integer(4)      not null, primary key
#  started_at :datetime
#  stopped_at :datetime
#

class LiveRaid < ActiveRecord::Base
  attr_accessible :attendees_string
  
  has_many :live_attendees, :dependent => :destroy, :order => 'member_name'
  has_many :live_loots, :dependent => :destroy, :order => 'id DESC'
  
  alias_method :attendees, :live_attendees
  alias_method :loots, :live_loots
  
  validates_presence_of :started_at, :if => Proc.new { |obj| obj.stopped_at.present? }
  
  # Uses +started_at+ and +stopped_at+ to determine the raid's total running time
  # in minutes (surprise!)
  #
  # If the raid hasn't yet been stopped, this value will update in real time.
  #
  # ==== Example
  #   Started at Thu Dec 31 22:16:33 -0500 2009<commit_msg>LiveLoots shouldn't be sorted descending by default.<commit_after># == Schema Information
#
# Table name: live_raids
#
#  id         :integer(4)      not null, primary key
#  started_at :datetime
#  stopped_at :datetime
#

class LiveRaid < ActiveRecord::Base
  attr_accessible :attendees_string
  
  has_many :live_attendees, :dependent => :destroy, :order => 'member_name'
  has_many :live_loots, :dependent => :destroy, :order => 'id'
  
  alias_method :attendees, :live_attendees
  alias_method :loots, :live_loots
  
  validates_presence_of :started_at, :if => Proc.new { |obj| obj.stopped_at.present? }
  
  # Uses +started_at+ and +stopped_at+ to determine the raid's total running time
  # in minutes (surprise!)
  #
  # If the raid hasn't yet been stopped, this value will update in real time.
  #
  # ==== Example
  #   Started at Thu Dec 31 22:16:33 -0500 2009
{'fraction_non_alphanumeric': 0.10902696365767878, 'fraction_numerical': 0.01992966002344666, 'mean_word_length': 3.9766763848396502, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '6164650', 'n_tokens_mistral': 627, 'n_tokens_neox': 594, 'n_words': 170}