class Specter::Middleware::Missing

Public Instance Methods

call(env) click to toggle source
# File lib/specter/middleware/missing.rb, line 5
def call(env)
  @app.call(env)

  if env.empty?
    env.merge!(
      'STATUS' => [
        {
          'STATUS' => 'E',
          'When' => Time.now.to_i,
          'Code' => 14,
          'Msg' => 'Invalid command',
          'Description' => "specter #{VERSION}"
        }
      ],
      'id' => 1
    )
  end
end