Class: Caterer::Action::Image::Cleanup

Inherits:
Base
  • Object
show all
Defined in:
lib/caterer/action/image/cleanup.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Caterer::Action::Base

Instance Method Details

#call(env) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/caterer/action/image/cleanup.rb', line 6

def call(env)

  config = env[:config]
  server = env[:server]
  image  = config.images[env[:image]]

  if image
    image.cleanup(server) if env[:ghost_mode]
  end

  @app.call(env)
end