Class: Wrappi::Executer
- Inherits:
-
Object
- Object
- Wrappi::Executer
- Defined in:
- lib/wrappi/executer.rb,
lib/wrappi/executer/cacher.rb,
lib/wrappi/executer/retryer.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#cacher ⇒ Object
readonly
Returns the value of attribute cacher.
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
-
#retryer ⇒ Object
readonly
Returns the value of attribute retryer.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(endpoint) ⇒ Executer
constructor
A new instance of Executer.
Constructor Details
Instance Attribute Details
#cacher ⇒ Object (readonly)
Returns the value of attribute cacher.
8 9 10 |
# File 'lib/wrappi/executer.rb', line 8 def cacher @cacher end |
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
8 9 10 |
# File 'lib/wrappi/executer.rb', line 8 def endpoint @endpoint end |
#retryer ⇒ Object (readonly)
Returns the value of attribute retryer.
8 9 10 |
# File 'lib/wrappi/executer.rb', line 8 def retryer @retryer end |
Class Method Details
.call(*args) ⇒ Object
4 5 6 |
# File 'lib/wrappi/executer.rb', line 4 def self.call(*args) new(*args).call end |
Instance Method Details
#call ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/wrappi/executer.rb', line 15 def call if cache? cacher.call do request_with_retry end else request_with_retry end end |