Class: Gpdb::Configuration
- Inherits:
-
Object
- Object
- Gpdb::Configuration
- Includes:
- Singleton
- Defined in:
- lib/gpdb/configuration.rb
Instance Attribute Summary collapse
-
#access_key_id ⇒ Object
Returns the value of attribute access_key_id.
-
#api_url ⇒ Object
Returns the value of attribute api_url.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
-
#secret_access_key ⇒ Object
Returns the value of attribute secret_access_key.
Instance Method Summary collapse
- #credentials ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
12 13 14 15 16 17 |
# File 'lib/gpdb/configuration.rb', line 12 def initialize self.api_url = ENV.fetch('GPDB_API_URL') self.namespace = ENV.fetch('GPDB_NAMESPACE') self.access_key_id = ENV.fetch('GPDB_ACCESS_KEY_ID') self.secret_access_key = ENV.fetch('GPDB_SECRET_ACCESS_KEY') end |
Instance Attribute Details
#access_key_id ⇒ Object
Returns the value of attribute access_key_id.
9 10 11 |
# File 'lib/gpdb/configuration.rb', line 9 def access_key_id @access_key_id end |
#api_url ⇒ Object
Returns the value of attribute api_url.
8 9 10 |
# File 'lib/gpdb/configuration.rb', line 8 def api_url @api_url end |
#namespace ⇒ Object
Returns the value of attribute namespace.
7 8 9 |
# File 'lib/gpdb/configuration.rb', line 7 def namespace @namespace end |
#secret_access_key ⇒ Object
Returns the value of attribute secret_access_key.
10 11 12 |
# File 'lib/gpdb/configuration.rb', line 10 def secret_access_key @secret_access_key end |
Instance Method Details
#credentials ⇒ Object
19 20 21 |
# File 'lib/gpdb/configuration.rb', line 19 def credentials Credentials.new(access_key_id, secret_access_key) end |