Class: ProductLine::CacheFlusher

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

Overview

Service object: cache flusher.

Instance Attribute Summary

Attributes inherited from BaseService

#options

Instance Method Summary collapse

Methods inherited from BaseService

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

Constructor Details

This class inherits a constructor from BaseService

Instance Method Details

#process(product_line_or_id) ⇒ Object



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

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