<commit_before>module Comable
  module ApplicationHelper
    def current_store
      @current_store || load_store
    end

    def current_customer
      @current_customer || load_customer
    end

    def name_with_honorific(name)
      I18n.t('comable.honorific', name: name)
    end

    def name_with_quantity(name, quantity)
      return name unless quantity
      return name if quantity <= 1
      [
        name,
        "x#{quantity}"
      ].join(' ')
    end

    private

    def load_store
      @current_store = Comable::Store.instance
    end

    def load_customer
      @current_customer = logged_in_customer
      @current_customer ||= Comable::Customer.new(cookies)
    end

    def logged_in_customer
      # Please override this method for logged in customer
    end
  end
end<commit_msg>Add a helper method for current order<commit_after>module Comable
  module ApplicationHelper
    def current_store
      @current_store || load_store
    end

    def current_customer
      @current_customer || load_customer
    end

    def current_order
      current_customer.incomplete_order
    end

    def name_with_honorific(name)
      I18n.t('comable.honorific', name: name)
    end

    def name_with_quantity(name, quantity)
      return name unless quantity
      return name if quantity <= 1
      [
        name,
        "x#{quantity}"
      ].join(' ')
    end

    private

    def load_store
      @current_store = Comable::Store.instance
    end

    def load_customer
      @current_customer = logged_in_customer
      @current_customer ||= Comable::Customer.new(cookies)
    end

    def logged_in_customer
      # Please override this method for logged in customer
    end
  end
end
{'fraction_non_alphanumeric': 0.06363105662580268, 'fraction_numerical': 0.0035026269702276708, 'mean_word_length': 2.548654244306418, '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': '1553124', 'n_tokens_mistral': 509, 'n_tokens_neox': 487, 'n_words': 133}