Class: Bakong::OpenApi::Configuration
- Inherits:
-
Object
- Object
- Bakong::OpenApi::Configuration
- Defined in:
- lib/bakong/open_api/configuration.rb
Overview
Client-wide configuration. Either passed to Client.new explicitly or mutated via Bakong::OpenApi.configure { |c| … } for a thread-local default singleton.
Constant Summary collapse
- DEFAULT_BASE_URL =
"https://api-bakong.nbc.gov.kh"- DEFAULT_TIMEOUT =
45
Instance Attribute Summary collapse
-
#base_url ⇒ Object
Returns the value of attribute base_url.
-
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
-
#read_timeout ⇒ Object
Returns the value of attribute read_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.
14 15 16 17 18 19 |
# File 'lib/bakong/open_api/configuration.rb', line 14 def initialize @base_url = DEFAULT_BASE_URL @open_timeout = DEFAULT_TIMEOUT @read_timeout = DEFAULT_TIMEOUT @user_agent = "bakong-open-api-ruby/#{Bakong::OpenApi::VERSION}" end |
Instance Attribute Details
#base_url ⇒ Object
Returns the value of attribute base_url.
12 13 14 |
# File 'lib/bakong/open_api/configuration.rb', line 12 def base_url @base_url end |
#open_timeout ⇒ Object
Returns the value of attribute open_timeout.
12 13 14 |
# File 'lib/bakong/open_api/configuration.rb', line 12 def open_timeout @open_timeout end |
#read_timeout ⇒ Object
Returns the value of attribute read_timeout.
12 13 14 |
# File 'lib/bakong/open_api/configuration.rb', line 12 def read_timeout @read_timeout end |
#token ⇒ Object
Returns the value of attribute token.
12 13 14 |
# File 'lib/bakong/open_api/configuration.rb', line 12 def token @token end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
12 13 14 |
# File 'lib/bakong/open_api/configuration.rb', line 12 def user_agent @user_agent end |