Class: Spina::Shop::CacheOrder

Inherits:
Object
  • Object
show all
Defined in:
app/services/spina/shop/cache_order.rb

Instance Method Summary collapse

Constructor Details

#initialize(order) ⇒ CacheOrder

Returns a new instance of CacheOrder.



4
5
6
# File 'app/services/spina/shop/cache_order.rb', line 4

def initialize(order)
  @order = order
end

Instance Method Details

#cacheObject



8
9
10
11
12
13
14
# File 'app/services/spina/shop/cache_order.rb', line 8

def cache
  # Cache each item first
  cache_order_items

  # Cache delivery option
  cache_delivery_option if @order.delivery_option.present?
end