Class: Orbit::Interceptors::Base
- Inherits:
-
Rack::Response
- Object
- Rack::Response
- Orbit::Interceptors::Base
- Defined in:
- lib/orbit/interceptors/base.rb
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #intercept ⇒ Object
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
4 5 6 7 |
# File 'lib/orbit/interceptors/base.rb', line 4 def initialize super @status = 302 end |
Class Method Details
.execute ⇒ Object
9 10 11 |
# File 'lib/orbit/interceptors/base.rb', line 9 def self.execute new.execute end |
Instance Method Details
#execute ⇒ Object
13 14 15 16 17 18 |
# File 'lib/orbit/interceptors/base.rb', line 13 def execute @intercept = redirect(intercept, status) @intercept ? self : nil end |
#intercept ⇒ Object
20 21 22 |
# File 'lib/orbit/interceptors/base.rb', line 20 def intercept raise NotImplementedError.new("#intercept method must be implemented on #{self.class.name}") end |