Class: ProductLine::CacheFlusher

Inherits:
BaseService show all
Defined in:
app/services/product_line/cache_flusher.rb

Instance Method Summary collapse

Methods inherited from BaseService

#initialize, #log_debug, #log_error, #log_info, #log_warning, #logger, #options, #tagged_logger

Constructor Details

This class inherits a constructor from BaseService

Instance Method Details

#process(product_line_or_id) ⇒ Object



2
3
4
5
6
7
8
9
# File 'app/services/product_line/cache_flusher.rb', line 2

def process(product_line_or_id)
  if product_line_or_id.is_a?(ProductLine)
    product_line = product_line_or_id
  else
    product_line = ProductLine.find(product_line_or_id)
  end
  product_line.descendants.each(&:touch)
end