<commit_before>require_relative 'carriage.rb'

class CargoCarriage < Carriage 
  def initialize
    @type = :cargo
  end
end<commit_msg>Add volume methods for CargoCarriage<commit_after>require_relative 'carriage.rb'

class CargoCarriage < Carriage 
  def initialize(volume)
    @type = :cargo
    @volume = volume
    @used_volume = 0
  end

  def available
    @volume - self.used
  end

  def fill_in(volume)
    self.available > volume ? @used_volume += volume : ( raise 'Недостаточно свободного места' )
  end

  def used
    @used_volume
  end
end

{'fraction_non_alphanumeric': 0.0776173285198556, 'fraction_numerical': 0.0018050541516245488, 'mean_word_length': 3.5121951219512195, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5693618', 'n_tokens_mistral': 192, 'n_tokens_neox': 187, 'n_words': 49}