Method: Hanami::API::Block::Context#halt
- Defined in:
- lib/hanami/api/block/context.rb
#halt(status, body = nil) ⇒ Object
Halts the flow of the block and immediately returns with the current HTTP status
55 56 57 58 |
# File 'lib/hanami/api/block/context.rb', line 55 def halt(status, body = nil) body ||= http_status(status) throw :halt, [status, body] end |