Class: Pinecone::Configuration
- Inherits:
-
Object
- Object
- Pinecone::Configuration
- Defined in:
- lib/pinecone.rb
Constant Summary collapse
- DEFAULT_BASE_URI =
"https://api.pinecone.io"
Instance Attribute Summary collapse
- #api_key ⇒ Object
-
#base_uri ⇒ Object
Returns the value of attribute base_uri.
- #environment ⇒ Object
-
#host ⇒ Object
Returns the value of attribute host.
-
#silence_deprecation_warnings ⇒ Object
writeonly
Sets the attribute silence_deprecation_warnings.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #silence_deprecation_warnings? ⇒ Boolean
Constructor Details
#initialize ⇒ Configuration
23 24 25 26 27 28 29 |
# File 'lib/pinecone.rb', line 23 def initialize @api_key = nil @environment = nil @base_uri = DEFAULT_BASE_URI @host = nil @silence_deprecation_warnings = false end |
Instance Attribute Details
#api_key ⇒ Object
31 32 33 34 35 |
# File 'lib/pinecone.rb', line 31 def api_key return @api_key if @api_key raise ConfigurationError, "Pinecone API key not set" end |
#base_uri ⇒ Object
Returns the value of attribute base_uri.
21 22 23 |
# File 'lib/pinecone.rb', line 21 def base_uri @base_uri end |
#environment ⇒ Object
37 38 39 40 41 |
# File 'lib/pinecone.rb', line 37 def environment return @environment if @environment raise ConfigurationError, "Pinecone environment not set" end |
#host ⇒ Object
Returns the value of attribute host.
21 22 23 |
# File 'lib/pinecone.rb', line 21 def host @host end |
#silence_deprecation_warnings=(value) ⇒ Object (writeonly)
Sets the attribute silence_deprecation_warnings
20 21 22 |
# File 'lib/pinecone.rb', line 20 def silence_deprecation_warnings=(value) @silence_deprecation_warnings = value end |
Instance Method Details
#silence_deprecation_warnings? ⇒ Boolean
43 44 45 |
# File 'lib/pinecone.rb', line 43 def silence_deprecation_warnings? @silence_deprecation_warnings end |