<commit_before>class TimeParser
  def initialize(time_spent)
    @time_spent = time_spent
  end

  def minutes
  # 1:30, 1.5, 90, 1h, 270 minut
    if @time_spent.include? ":"
      hours, mins = @time_spent.split(":")
      @minutes = hours.to_i * 60 + mins.to_i
    elsif @time_spent.include? "."
      mins = @time_spent.to_f * 60
      @minutes = mins.to_i
    elsif @time_spent.include? "h"
      mins = @time_spent.to_f * 60
      @minutes = mins.to_i
    elsif @time_spent.include? "minut"
      @minutes = @time_spent.to_i
    else
      @minutes = @time_spent.to_i rescue @minutes = nil
    end
  end
end
<commit_msg>Rescue whole block<commit_after>class TimeParser
  def initialize(time_spent)
    @time_spent = time_spent
  end

  def minutes
  # 1:30, 1.5, 90, 1h, 270 minut
    if @time_spent.include? ":"
      hours, mins = @time_spent.split(":")
      @minutes = hours.to_i * 60 + mins.to_i
    elsif @time_spent.include? "."
      mins = @time_spent.to_f * 60
      @minutes = mins.to_i
    elsif @time_spent.include? "h"
      mins = @time_spent.to_f * 60
      @minutes = mins.to_i
    elsif @time_spent.include? "minut"
      @minutes = @time_spent.to_i
    else
      @minutes = @time_spent.to_i
    end
  rescue
    nil
  end
end

{'fraction_non_alphanumeric': 0.1182108626198083, 'fraction_numerical': 0.027156549520766772, 'mean_word_length': 2.5698005698005697, 'pattern_counts': {'":': 4, '<': 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': '5151858', 'n_tokens_mistral': 551, 'n_tokens_neox': 499, 'n_words': 107}