<commit_before>module FileDb
  module Data
    def initialize params= {}
      load_params_into_model parms
    end


    def load_params_into_model params
      params.each do |key, value|
        next unless self.class.columns.include?(key)
        send("#{key}=", value)
      end 
    end

    def create params
      load_params_into_model params
      save
      self
    end
    
    def save
      if persisted?
        self.class.update_database self
      else
        self.id = Time.now.to_i
        self.class.append_to_database self
      end
      self
    end


    def persisted?
      !id.nil?
    end
  end  
end<commit_msg>remove self from save<commit_after>module FileDb
  module Data
    def initialize params= {}
      load_params_into_model parms
    end


    def load_params_into_model params
      params.each do |key, value|
        next unless self.class.columns.include?(key)
        send("#{key}=", value)
      end 
    end

    def create params
      load_params_into_model params
      save
      self
    end
    
    def save
      if persisted?
        self.class.update_database self
      else
        self.id = Time.now.to_i
        self.class.append_to_database self
      end
    end


    def persisted?
      !id.nil?
    end
  end  
end
{'fraction_non_alphanumeric': 0.05932864949258392, 'fraction_numerical': 0.0, 'mean_word_length': 1.8300220750551877, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1026918', 'n_tokens_mistral': 399, 'n_tokens_neox': 386, 'n_words': 105}