Class: Asimov::Configuration
- Inherits:
-
Object
- Object
- Asimov::Configuration
- Defined in:
- lib/asimov/configuration.rb
Overview
Application-wide configuration for the Asimov library. Should be configured once using the Asimov.configure method on application startup.
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#request_options ⇒ Object
Returns the value of attribute request_options.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Initializes the Configuration object and resets it to default values.
-
#reset ⇒ Object
Reset the configuration to default values.
Constructor Details
#initialize ⇒ Configuration
Initializes the Configuration object and resets it to default values.
17 18 19 |
# File 'lib/asimov/configuration.rb', line 17 def initialize reset end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
10 11 12 |
# File 'lib/asimov/configuration.rb', line 10 def api_key @api_key end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
10 11 12 |
# File 'lib/asimov/configuration.rb', line 10 def organization_id @organization_id end |
#request_options ⇒ Object
Returns the value of attribute request_options.
12 13 14 |
# File 'lib/asimov/configuration.rb', line 12 def @request_options end |
Instance Method Details
#reset ⇒ Object
Reset the configuration to default values. Mostly used for testing.
24 25 26 27 28 |
# File 'lib/asimov/configuration.rb', line 24 def reset @api_key = nil @organization_id = nil @request_options = {} end |