Class: Zotero::HTTPConfig
- Inherits:
-
Object
- Object
- Zotero::HTTPConfig
- Defined in:
- lib/zotero/http_config.rb
Overview
Configuration for HTTP requests
Instance Attribute Summary collapse
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
-
#verify_ssl ⇒ Object
Returns the value of attribute verify_ssl.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(open_timeout: 30, read_timeout: 60, verify_ssl: true) ⇒ HTTPConfig
constructor
A new instance of HTTPConfig.
Constructor Details
#initialize(open_timeout: 30, read_timeout: 60, verify_ssl: true) ⇒ HTTPConfig
Returns a new instance of HTTPConfig.
8 9 10 11 12 |
# File 'lib/zotero/http_config.rb', line 8 def initialize(open_timeout: 30, read_timeout: 60, verify_ssl: true) @open_timeout = open_timeout @read_timeout = read_timeout @verify_ssl = verify_ssl end |
Instance Attribute Details
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
6 7 8 |
# File 'lib/zotero/http_config.rb', line 6 def open_timeout @open_timeout end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
6 7 8 |
# File 'lib/zotero/http_config.rb', line 6 def read_timeout @read_timeout end |
#verify_ssl ⇒ Object
Returns the value of attribute verify_ssl.
6 7 8 |
# File 'lib/zotero/http_config.rb', line 6 def verify_ssl @verify_ssl end |
Class Method Details
.configure {|default| ... } ⇒ Object
18 19 20 21 |
# File 'lib/zotero/http_config.rb', line 18 def self.configure yield(default) if block_given? default end |
.default ⇒ Object
14 15 16 |
# File 'lib/zotero/http_config.rb', line 14 def self.default @default ||= new end |