Class: Workarea::Storefront::ProductViewModel::CacheKey

Inherits:
Object
  • Object
show all
Defined in:
app/view_models/workarea/storefront/product_view_model/cache_key.rb

Instance Method Summary collapse

Constructor Details

#initialize(product, options = {}) ⇒ CacheKey

Returns a new instance of CacheKey.



5
6
7
8
# File 'app/view_models/workarea/storefront/product_view_model/cache_key.rb', line 5

def initialize(product, options = {})
  @product = product
  @options = options
end

Instance Method Details

#to_sObject



10
11
12
# File 'app/view_models/workarea/storefront/product_view_model/cache_key.rb', line 10

def to_s
  (product_parts + option_parts).join('/')
end