<commit_before>module SimplyStated
  def self.included(klass)
    klass.instance_eval do
      extend ClassMethods
      before_validation :transition
      cattr_accessor :states
      cattr_accessor :state_validation_hash
      self.state_validation_hash = {}
    end
  end
  
  def state() self[:state].try :to_sym end<commit_msg>named scopes<commit_after>module SimplyStated
  def self.included(klass)
    klass.instance_eval do
      extend ClassMethods
      before_validation :transition
      cattr_accessor :states
      cattr_accessor :state_validation_hash
      named_scope :in_state, lambda {|*s| {:conditions => ['state in (?)', s.map(&:to_s)]}}
      named_scope :not_in_state, lambda {|*s| {:conditions => ['state not in (?)', s.map(&:to_s)]}}
      self.state_validation_hash = {}
    end
  end
  
  def state() self[:state].try :to_sym end
{'fraction_non_alphanumeric': 0.1073512252042007, 'fraction_numerical': 0.0, 'mean_word_length': 3.637837837837838, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4782916', 'n_tokens_mistral': 274, 'n_tokens_neox': 273, 'n_words': 61}