Class: RestCore::ErrorDetectorHttp
- Inherits:
-
ErrorDetector
- Object
- ErrorDetector
- RestCore::ErrorDetectorHttp
- Defined in:
- lib/rest-core/middleware/error_detector_http.rb
Instance Method Summary collapse
-
#initialize(app, detector = nil) ⇒ ErrorDetectorHttp
constructor
A new instance of ErrorDetectorHttp.
Methods inherited from ErrorDetector
Constructor Details
#initialize(app, detector = nil) ⇒ ErrorDetectorHttp
Returns a new instance of ErrorDetectorHttp.
6 7 8 9 |
# File 'lib/rest-core/middleware/error_detector_http.rb', line 6 def initialize app, detector=nil super(app, detector || lambda{ |env| (env[RESPONSE_STATUS] || 200) / 100 >= 4 }) end |