Class: Caterer::Action::Server::Validate::Unlocked

Inherits:
Base
  • Object
show all
Defined in:
lib/caterer/action/server/validate/unlocked.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



7
8
9
10
11
12
13
14
15
# File 'lib/caterer/action/server/validate/unlocked.rb', line 7

def call(env)

  if env[:server].locked?
    env[:ui].error "Server is currently locked, cannot proceed"
    return
  end

  @app.call(env)
end