Class: ActiveCart::StorageEngines::Memory

Inherits:
Array
  • Object
show all
Includes:
CartStorage
Defined in:
lib/active_cart/storage_engines/memory.rb

Overview

This storage engine is probably only useful as a reference implementation (It would work in a desktop app I guess). Items only exist in memory, so as soon as the thread dies, so does the cart.

Instance Method Summary collapse

Methods included from CartStorage

#add_to_cart, #enter_checkout, #enter_completed, #enter_failed, #enter_shopping, #enter_verifying_payment, #exit_checkout, #exit_completed, #exit_failed, #exit_shopping, #exit_verifying_payment, #guard_check_payment, #guard_checkout, #guard_continue_shopping, #guard_payment_failed, #guard_payment_successful, included, #quantity, #remove_from_cart, #state, #sub_total

Instance Method Details

#invoice_idObject



9
10
11
# File 'lib/active_cart/storage_engines/memory.rb', line 9

def invoice_id
  @@last_id = @@last_id ? @@last_id + 1 : 1
end