Module: Hanami::Action::Halt Private

Defined in:
lib/hanami/action/halt.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Since:

  • 2.0.0

Class Method Summary collapse

Class Method Details

.call(status, body = nil) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 2.0.0



12
13
14
15
# File 'lib/hanami/action/halt.rb', line 12

def self.call(status, body = nil)
  code, message = Http::Status.for_code(status)
  throw :halt, [code, body || message]
end