Module: Roy::Halt::InstanceMethods

Defined in:
lib/roy/halt.rb

Instance Method Summary (collapse)

Instance Method Details

- (Integer, String) halt(code, message = nil)

Break from the current catch(:halt) block



35
36
37
# File 'lib/roy/halt.rb', line 35

def halt(code, message=nil)
  throw :halt, [code, message || Rack::Utils::HTTP_STATUS_CODES[code]]
end