<commit_before>require_relative 'item'
#
# This class represents a shopping cart of items
#
class ShoppingCart

  attr_reader :list

  # Constructor
  def initialize input
    @list = input.inject(Array.new) { |list, itemStr| list << Item.new(itemStr)}
  end

end<commit_msg>Added comment to ShoppingCart<commit_after>require_relative 'item'
#
# This class represents a shopping cart of items
#
# Accepts a string in the format: {qty} {description} at {price}
#
class ShoppingCart

  attr_reader :list

  # Constructor
  def initialize inputStr
    @list = inputStr.inject(Array.new) { |list, itemStr| list << Item.new(itemStr)}
  end

end
{'fraction_non_alphanumeric': 0.09546165884194054, 'fraction_numerical': 0.0, 'mean_word_length': 4.517241379310345, 'pattern_counts': {'":': 0, '<': 7, '<?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': '6571664', 'n_tokens_mistral': 205, 'n_tokens_neox': 200, 'n_words': 64}