Class: Pinecone::Configuration
- Inherits:
-
Object
- Object
- Pinecone::Configuration
- Defined in:
- lib/pinecone.rb
Instance Attribute Summary collapse
- #api_key ⇒ Object
- #base_uri ⇒ Object
- #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
Returns a new instance of Configuration.
21 22 23 24 25 26 27 |
# File 'lib/pinecone.rb', line 21 def initialize @api_key = nil @environment = nil @base_uri = nil @host = nil @silence_deprecation_warnings = false end |
Instance Attribute Details
#api_key ⇒ Object
29 30 31 32 33 |
# File 'lib/pinecone.rb', line 29 def api_key return @api_key if @api_key raise ConfigurationError, "Pinecone API key not set" end |
#base_uri ⇒ Object
35 36 37 38 39 |
# File 'lib/pinecone.rb', line 35 def base_uri return @base_uri if @base_uri raise ConfigurationError, "Pinecone domain not set" end |
#environment ⇒ Object
41 42 43 44 45 |
# File 'lib/pinecone.rb', line 41 def environment return @environment if @environment raise ConfigurationError, "Pinecone environment not set" end |
#host ⇒ Object
Returns the value of attribute host.
19 20 21 |
# File 'lib/pinecone.rb', line 19 def host @host end |
#silence_deprecation_warnings=(value) ⇒ Object (writeonly)
Sets the attribute silence_deprecation_warnings
18 19 20 |
# File 'lib/pinecone.rb', line 18 def silence_deprecation_warnings=(value) @silence_deprecation_warnings = value end |
Instance Method Details
#silence_deprecation_warnings? ⇒ Boolean
47 48 49 |
# File 'lib/pinecone.rb', line 47 def silence_deprecation_warnings? @silence_deprecation_warnings end |