Class: IdempotentRequest::Policy

Inherits:
Object
  • Object
show all
Defined in:
lib/idempotent_request/policy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#requestObject (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

Returns:

  • (Boolean)


11
12
13
# File 'lib/idempotent_request/policy.rb', line 11

def should?
  !request.request.get?
end