Class: Idempotent::Handler
- Inherits:
-
Object
- Object
- Idempotent::Handler
- Defined in:
- lib/idempotent/handler.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#rescue_policy ⇒ Object
readonly
Returns the value of attribute rescue_policy.
-
#retry_policy ⇒ Object
readonly
Returns the value of attribute retry_policy.
Instance Method Summary collapse
-
#initialize(app, options = {}) ⇒ Handler
constructor
A new instance of Handler.
- #store_exception(exception, request) ⇒ Object
Constructor Details
#initialize(app, options = {}) ⇒ Handler
Returns a new instance of Handler.
5 6 7 8 9 |
# File 'lib/idempotent/handler.rb', line 5 def initialize(app, ={}) @app = app @retry_policy = [:retry] || Idempotent::ImmediateRetry.new @rescue_policy = [:rescue] || Idempotent::DefaultRescue.new end |
Instance Attribute Details
#rescue_policy ⇒ Object (readonly)
Returns the value of attribute rescue_policy.
3 4 5 |
# File 'lib/idempotent/handler.rb', line 3 def rescue_policy @rescue_policy end |
#retry_policy ⇒ Object (readonly)
Returns the value of attribute retry_policy.
3 4 5 |
# File 'lib/idempotent/handler.rb', line 3 def retry_policy @retry_policy end |
Instance Method Details
#store_exception(exception, request) ⇒ Object
12 13 |
# File 'lib/idempotent/handler.rb', line 12 def store_exception(exception, request) end |