Module: Scales::Worker::Cache::Update

Includes:
Helper::ContentTypes
Defined in:
lib/scales-worker/cache/update.rb

Class Method Summary collapse

Class Method Details

.update(*paths, params) ⇒ Object



9
10
11
12
13
14
# File 'lib/scales-worker/cache/update.rb', line 9

def update(*paths, params)
  raise "Please define a format like this :format => :html" unless params.is_a?(Hash)
  format = params.delete(:format)
  raise "Unknown format :#{format}"                         if format.to_content_type.nil?
  paths.each{ |path| Thread.current[:post_process_queue] << { :format => format, :to => path }}
end