Class: PrettyTimeouts::TimeoutError
- Inherits:
-
Faraday::Error::TimeoutError
- Object
- Faraday::Error::TimeoutError
- PrettyTimeouts::TimeoutError
- Defined in:
- lib/pretty_timeouts/timeout_error.rb
Instance Attribute Summary collapse
-
#service_name ⇒ Object
readonly
Returns the value of attribute service_name.
-
#timeout ⇒ Object
readonly
Returns the value of attribute timeout.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(service_name, timeout, url) ⇒ TimeoutError
constructor
A new instance of TimeoutError.
- #message ⇒ Object
Constructor Details
#initialize(service_name, timeout, url) ⇒ TimeoutError
Returns a new instance of TimeoutError.
5 6 7 8 9 |
# File 'lib/pretty_timeouts/timeout_error.rb', line 5 def initialize(service_name, timeout, url) @service_name = service_name @timeout = timeout @url = url end |
Instance Attribute Details
#service_name ⇒ Object (readonly)
Returns the value of attribute service_name.
3 4 5 |
# File 'lib/pretty_timeouts/timeout_error.rb', line 3 def service_name @service_name end |
#timeout ⇒ Object (readonly)
Returns the value of attribute timeout.
3 4 5 |
# File 'lib/pretty_timeouts/timeout_error.rb', line 3 def timeout @timeout end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
3 4 5 |
# File 'lib/pretty_timeouts/timeout_error.rb', line 3 def url @url end |
Instance Method Details
#message ⇒ Object
11 12 13 |
# File 'lib/pretty_timeouts/timeout_error.rb', line 11 def "#{service_name} timeout of #{timeout}s reached attempting to connect to #{url}" end |