Class: Octoparts::Configuration
- Inherits:
-
Object
- Object
- Octoparts::Configuration
- Defined in:
- lib/octoparts/configuration.rb
Constant Summary collapse
- USER_AGENT =
"Octoparts client ruby/#{Octoparts::VERSION}"
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#headers ⇒ Object
Returns the value of attribute headers.
-
#open_timeout_sec ⇒ Object
Returns the value of attribute open_timeout_sec.
-
#timeout_sec ⇒ Object
Returns the value of attribute timeout_sec.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
7 8 9 10 11 12 13 14 15 |
# File 'lib/octoparts/configuration.rb', line 7 def initialize # set default values @endpoint = 'http://localhost:9000' @headers = { 'User-Agent' => USER_AGENT } @timeout_sec = nil @open_timeout_sec = nil end |
Instance Attribute Details
#endpoint ⇒ Object
Returns the value of attribute endpoint.
5 6 7 |
# File 'lib/octoparts/configuration.rb', line 5 def endpoint @endpoint end |
#headers ⇒ Object
Returns the value of attribute headers.
5 6 7 |
# File 'lib/octoparts/configuration.rb', line 5 def headers @headers end |
#open_timeout_sec ⇒ Object
Returns the value of attribute open_timeout_sec.
5 6 7 |
# File 'lib/octoparts/configuration.rb', line 5 def open_timeout_sec @open_timeout_sec end |
#timeout_sec ⇒ Object
Returns the value of attribute timeout_sec.
5 6 7 |
# File 'lib/octoparts/configuration.rb', line 5 def timeout_sec @timeout_sec end |