Exception: Waves::Dispatchers::Redirect
- Defined in:
- lib/dispatchers/base.rb
Overview
Redirect exceptions are rescued by the Waves dispatcher and used to set the response status and location.
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(path, status = '302') ⇒ Redirect
constructor
A new instance of Redirect.
- #message ⇒ Object
Constructor Details
#initialize(path, status = '302') ⇒ Redirect
Returns a new instance of Redirect.
13 14 15 16 |
# File 'lib/dispatchers/base.rb', line 13 def initialize( path, status = '302' ) @path = path @status = status end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
12 13 14 |
# File 'lib/dispatchers/base.rb', line 12 def path @path end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
12 13 14 |
# File 'lib/dispatchers/base.rb', line 12 def status @status end |
Instance Method Details
#message ⇒ Object
17 18 19 |
# File 'lib/dispatchers/base.rb', line 17 def "location: #{@path} status: #{@status}" end |