Class: HTTPX::Options::Timeouts
- Inherits:
-
Struct
- Object
- Struct
- HTTPX::Options::Timeouts
- Defined in:
- lib/httpx/options.rb,
sig/options.rbs
Instance Attribute Summary collapse
-
#close_handshake_timeout ⇒ Object
readonly
Returns the value of attribute close_handshake_timeout.
-
#connect_timeout ⇒ Object
readonly
Returns the value of attribute connect_timeout.
-
#keep_alive_timeout ⇒ Object
readonly
Returns the value of attribute keep_alive_timeout.
-
#operation_timeout ⇒ Object
readonly
Returns the value of attribute operation_timeout.
-
#ping_timeout ⇒ Object
readonly
Returns the value of attribute ping_timeout.
-
#read_timeout ⇒ Object
readonly
Returns the value of attribute read_timeout.
-
#request_timeout ⇒ Object
readonly
Returns the value of attribute request_timeout.
-
#settings_timeout ⇒ Object
readonly
Returns the value of attribute settings_timeout.
-
#total_request_timeout ⇒ Object
readonly
Returns the value of attribute total_request_timeout.
-
#write_timeout ⇒ Object
readonly
Returns the value of attribute write_timeout.
Instance Method Summary collapse
- #[] ⇒ interval?
-
#initialize(connect_timeout: nil, settings_timeout: nil, read_timeout: nil, write_timeout: nil, request_timeout: nil, total_request_timeout: nil, operation_timeout: nil, close_handshake_timeout: nil, keep_alive_timeout: nil, ping_timeout: nil) ⇒ Timeouts
constructor
A new instance of Timeouts.
- #merge(other) ⇒ Timeouts
- #to_h ⇒ Hash[Symbol, interval?]
Constructor Details
#initialize(connect_timeout: nil, settings_timeout: nil, read_timeout: nil, write_timeout: nil, request_timeout: nil, total_request_timeout: nil, operation_timeout: nil, close_handshake_timeout: nil, keep_alive_timeout: nil, ping_timeout: nil) ⇒ Timeouts
Returns a new instance of Timeouts.
559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 |
# File 'lib/httpx/options.rb', line 559 def initialize( connect_timeout: nil, settings_timeout: nil, read_timeout: nil, write_timeout: nil, request_timeout: nil, total_request_timeout: nil, operation_timeout: nil, close_handshake_timeout: nil, keep_alive_timeout: nil, ping_timeout: nil ) super freeze end |
Instance Attribute Details
#close_handshake_timeout ⇒ Object
Returns the value of attribute close_handshake_timeout
552 553 554 |
# File 'lib/httpx/options.rb', line 552 def close_handshake_timeout @close_handshake_timeout end |
#connect_timeout ⇒ Object
Returns the value of attribute connect_timeout
552 553 554 |
# File 'lib/httpx/options.rb', line 552 def connect_timeout @connect_timeout end |
#keep_alive_timeout ⇒ Object
Returns the value of attribute keep_alive_timeout
552 553 554 |
# File 'lib/httpx/options.rb', line 552 def keep_alive_timeout @keep_alive_timeout end |
#operation_timeout ⇒ Object
Returns the value of attribute operation_timeout
552 553 554 |
# File 'lib/httpx/options.rb', line 552 def operation_timeout @operation_timeout end |
#ping_timeout ⇒ Object
Returns the value of attribute ping_timeout
552 553 554 |
# File 'lib/httpx/options.rb', line 552 def ping_timeout @ping_timeout end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout
552 553 554 |
# File 'lib/httpx/options.rb', line 552 def read_timeout @read_timeout end |
#request_timeout ⇒ Object
Returns the value of attribute request_timeout
552 553 554 |
# File 'lib/httpx/options.rb', line 552 def request_timeout @request_timeout end |
#settings_timeout ⇒ Object
Returns the value of attribute settings_timeout
552 553 554 |
# File 'lib/httpx/options.rb', line 552 def settings_timeout @settings_timeout end |
#total_request_timeout ⇒ Object
Returns the value of attribute total_request_timeout
552 553 554 |
# File 'lib/httpx/options.rb', line 552 def total_request_timeout @total_request_timeout end |
#write_timeout ⇒ Object
Returns the value of attribute write_timeout
552 553 554 |
# File 'lib/httpx/options.rb', line 552 def write_timeout @write_timeout end |
Instance Method Details
#[] ⇒ interval?
261 |
# File 'sig/options.rbs', line 261
def []: (Symbol) -> interval?
|
#merge(other) ⇒ Timeouts
603 604 605 606 607 |
# File 'lib/httpx/options.rb', line 603 def merge(other) other_h = other.to_h other_h.compact! Timeouts.new(**to_h, **other_h) end |
#to_h ⇒ Hash[Symbol, interval?]
263 |
# File 'sig/options.rbs', line 263
def to_h: () -> Hash[Symbol, interval?]
|