Class: Hanami::Router::Redirect Private
- Inherits:
-
Object
- Object
- Hanami::Router::Redirect
- Defined in:
- lib/hanami/router/redirect.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
HTTP Redirect
Instance Attribute Summary collapse
- #code ⇒ Object readonly private
- #destination ⇒ Object readonly private
Instance Method Summary collapse
- #call(env) ⇒ Object private
-
#initialize(destination, code, endpoint) ⇒ Redirect
constructor
private
A new instance of Redirect.
Constructor Details
#initialize(destination, code, endpoint) ⇒ Redirect
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.
Returns a new instance of Redirect.
20 21 22 23 24 |
# File 'lib/hanami/router/redirect.rb', line 20 def initialize(destination, code, endpoint) @destination = destination @code = code @endpoint = endpoint end |
Instance Attribute Details
#code ⇒ Object (readonly)
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.
16 17 18 |
# File 'lib/hanami/router/redirect.rb', line 16 def code @code end |
#destination ⇒ Object (readonly)
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.
12 13 14 |
# File 'lib/hanami/router/redirect.rb', line 12 def destination @destination end |
Instance Method Details
#call(env) ⇒ 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.
28 29 30 |
# File 'lib/hanami/router/redirect.rb', line 28 def call(env) @endpoint.call(env) end |