<commit_before>module Shopping
  class UpdateLineItemService < Shopping::BaseService

    attr_accessor :cart, 
                  :source,
                  :quantity

    validates :cart, :source, presence: true
    validate :unpurchased_cart

    def initialize cart, source, quantity=1
      @cart = cart
      @source = source
      @quantity = quantity
    end

    def to_hash
      {
        cart_id: @cart.id,
        source_id: @source.id,
        source_type: @source.type,<commit_msg>Add meta to argument sig<commit_after>module Shopping
  class UpdateLineItemService < Shopping::BaseService

    attr_accessor :cart, 
                  :source,
                  :quantity

    validates :cart, :source, presence: true
    validate :unpurchased_cart

    def initialize cart, source, quantity=1, meta={}
      @cart = cart
      @source = source
      @quantity = quantity
    end

    def to_hash
      {
        cart_id: @cart.id,
        source_id: @source.id,
        source_type: @source.type,
{'fraction_non_alphanumeric': 0.08118811881188119, 'fraction_numerical': 0.0019801980198019802, 'mean_word_length': 2.139751552795031, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6980250', 'n_tokens_mistral': 305, 'n_tokens_neox': 286, 'n_words': 76}