Class: Brapi::Configuration
- Inherits:
-
Object
- Object
- Brapi::Configuration
- Defined in:
- lib/brapi/configuration.rb
Constant Summary collapse
- DEFAULT_BASE_URL =
"https://brapi.dev"- DEFAULT_TIMEOUT =
30- DEFAULT_OPEN_TIMEOUT =
10
Instance Attribute Summary collapse
-
#adapter ⇒ Object
Returns the value of attribute adapter.
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#timeout ⇒ Object
Returns the value of attribute timeout.
-
#token ⇒ Object
Returns the value of attribute token.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
11 12 13 14 15 16 17 18 |
# File 'lib/brapi/configuration.rb', line 11 def initialize @token = nil @base_url = DEFAULT_BASE_URL @timeout = DEFAULT_TIMEOUT @open_timeout = DEFAULT_OPEN_TIMEOUT @user_agent = "brapi-ruby-sdk/#{Brapi::VERSION}" @adapter = nil end |
Instance Attribute Details
#adapter ⇒ Object
Returns the value of attribute adapter.
9 10 11 |
# File 'lib/brapi/configuration.rb', line 9 def adapter @adapter end |
#base_url ⇒ Object
Returns the value of attribute base_url.
9 10 11 |
# File 'lib/brapi/configuration.rb', line 9 def base_url @base_url end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
9 10 11 |
# File 'lib/brapi/configuration.rb', line 9 def open_timeout @open_timeout end |
#timeout ⇒ Object
Returns the value of attribute timeout.
9 10 11 |
# File 'lib/brapi/configuration.rb', line 9 def timeout @timeout end |
#token ⇒ Object
Returns the value of attribute token.
9 10 11 |
# File 'lib/brapi/configuration.rb', line 9 def token @token end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
9 10 11 |
# File 'lib/brapi/configuration.rb', line 9 def user_agent @user_agent end |