Class: Octoparts::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/octoparts/configuration.rb

Constant Summary collapse

USER_AGENT =
"Octoparts client ruby/#{Octoparts::VERSION}"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration



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

#endpointObject

Returns the value of attribute endpoint.



5
6
7
# File 'lib/octoparts/configuration.rb', line 5

def endpoint
  @endpoint
end

#headersObject

Returns the value of attribute headers.



5
6
7
# File 'lib/octoparts/configuration.rb', line 5

def headers
  @headers
end

#open_timeout_secObject

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_secObject

Returns the value of attribute timeout_sec.



5
6
7
# File 'lib/octoparts/configuration.rb', line 5

def timeout_sec
  @timeout_sec
end