Class: Idempotent::Handler

Inherits:
Object
  • Object
show all
Defined in:
lib/idempotent/handler.rb

Direct Known Subclasses

Rack

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options={})
  @app           = app
  @retry_policy  = options[:retry] || Idempotent::ImmediateRetry.new
  @rescue_policy = options[:rescue] || Idempotent::DefaultRescue.new
end

Instance Attribute Details

#rescue_policyObject (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_policyObject (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