<commit_before>class Calculator::PerItem < Calculator
  preference :amount, :decimal, :default => 0

  def self.description
    I18n.t("flat_rate_per_item")
  end

  def compute(object=nil)
    self.preferred_amount * object.line_items.length
  end
end<commit_msg>Namespace Calculator::PerItem class<commit_after>module Spree
  class Calculator::PerItem < Calculator
    preference :amount, :decimal, :default => 0

    def self.description
      I18n.t("flat_rate_per_item")
    end

    def compute(object=nil)
      self.preferred_amount * object.line_items.length
    end
  end
end
{'fraction_non_alphanumeric': 0.09230769230769231, 'fraction_numerical': 0.010256410256410256, 'mean_word_length': 4.140350877192983, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '3390557', 'n_tokens_mistral': 200, 'n_tokens_neox': 188, 'n_words': 40}