Class: Faraday::BetterRetry::Options
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- Faraday::BetterRetry::Options
- Defined in:
- lib/faraday/better_retry.rb
Instance Method Summary collapse
-
#[](name) ⇒ Object
define for ruby less than 2.0.
- #[]=(name, value) ⇒ Object
- #exceptions ⇒ Object
- #interval ⇒ Object
- #max ⇒ Object
Instance Method Details
#[](name) ⇒ Object
define for ruby less than 2.0
33 34 35 |
# File 'lib/faraday/better_retry.rb', line 33 def [](name) @table[name.to_sym] end |
#[]=(name, value) ⇒ Object
37 38 39 |
# File 'lib/faraday/better_retry.rb', line 37 def []=(name, value) modifiable[new_ostruct_member(name)] = value end |
#exceptions ⇒ Object
28 29 30 |
# File 'lib/faraday/better_retry.rb', line 28 def exceptions Array(self[:exceptions] ||= [Errno::ETIMEDOUT, 'Timeout::Error', Error::TimeoutError]) end |
#interval ⇒ Object
24 25 26 |
# File 'lib/faraday/better_retry.rb', line 24 def interval (self[:interval] ||= 0).to_f end |
#max ⇒ Object
20 21 22 |
# File 'lib/faraday/better_retry.rb', line 20 def max (self[:max] ||= 2).to_i end |