Method: Flame::Dispatcher#halt
- Defined in:
- lib/flame/dispatcher.rb
#halt(new_status = nil, new_body = nil, new_headers = {}) ⇒ Object
Interrupt the execution of route, and set new optional data
(otherwise using existing)
121 122 123 124 125 126 |
# File 'lib/flame/dispatcher.rb', line 121 def halt(new_status = nil, new_body = nil, new_headers = {}) status new_status if new_status body new_body || (default_body_of_nearest_route if body.empty?) response.headers.merge!(new_headers) throw :halt end |