Exception: Modern::Redirect
- Inherits:
-
Exception
- Object
- Exception
- Modern::Redirect
- Defined in:
- lib/modern/redirect.rb
Overview
rubocop:disable Lint/InheritException
Direct Known Subclasses
Instance Attribute Summary collapse
-
#redirect_to ⇒ Object
readonly
Returns the value of attribute redirect_to.
Instance Method Summary collapse
-
#initialize(redirect_to) ⇒ Redirect
constructor
A new instance of Redirect.
- #status ⇒ Object
Constructor Details
#initialize(redirect_to) ⇒ Redirect
Returns a new instance of Redirect.
8 9 10 11 |
# File 'lib/modern/redirect.rb', line 8 def initialize(redirect_to) raise "Redirects require a target." if redirect_to.nil? @redirect_to = redirect_to end |
Instance Attribute Details
#redirect_to ⇒ Object (readonly)
Returns the value of attribute redirect_to.
6 7 8 |
# File 'lib/modern/redirect.rb', line 6 def redirect_to @redirect_to end |
Instance Method Details
#status ⇒ Object
13 14 15 |
# File 'lib/modern/redirect.rb', line 13 def status raise "#{self.class.name}#status must be implemented." end |