Class: SolovisApiClient::Config
- Inherits:
-
Object
- Object
- SolovisApiClient::Config
- Includes:
- Singleton
- Defined in:
- lib/solovis_api_client/config.rb
Instance Attribute Summary collapse
-
#configs ⇒ Object
Returns the value of attribute configs.
Instance Method Summary collapse
- #add(key, value) ⇒ Object
- #api_key ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #url ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 |
# File 'lib/solovis_api_client/config.rb', line 8 def initialize @configs = {} end |
Instance Attribute Details
#configs ⇒ Object
Returns the value of attribute configs.
6 7 8 |
# File 'lib/solovis_api_client/config.rb', line 6 def configs @configs end |
Instance Method Details
#add(key, value) ⇒ Object
12 13 14 |
# File 'lib/solovis_api_client/config.rb', line 12 def add(key, value) @configs[key] = value end |
#api_key ⇒ Object
20 21 22 |
# File 'lib/solovis_api_client/config.rb', line 20 def api_key @configs[:api_key] end |
#url ⇒ Object
16 17 18 |
# File 'lib/solovis_api_client/config.rb', line 16 def url @configs[:url] end |