Class: IdempotentRequest::Policy
- Inherits:
-
Object
- Object
- IdempotentRequest::Policy
- Defined in:
- lib/idempotent_request/policy.rb
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
-
#initialize(request) ⇒ Policy
constructor
A new instance of Policy.
- #should? ⇒ Boolean
Constructor Details
#initialize(request) ⇒ Policy
Returns a new instance of Policy.
7 8 9 |
# File 'lib/idempotent_request/policy.rb', line 7 def initialize(request) @request = request end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
5 6 7 |
# File 'lib/idempotent_request/policy.rb', line 5 def request @request end |
Instance Method Details
#should? ⇒ Boolean
11 12 13 |
# File 'lib/idempotent_request/policy.rb', line 11 def should? !request.request.get? end |