Class: Pinecone::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/pinecone.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



18
19
20
21
22
# File 'lib/pinecone.rb', line 18

def initialize
  @api_key = nil
  @environment = nil
  @base_uri = nil
end

Instance Attribute Details

#api_keyObject

Raises:



24
25
26
27
28
# File 'lib/pinecone.rb', line 24

def api_key
  return @api_key if @api_key

  raise ConfigurationError, "Pinecone API key not set"
end

#base_uriObject

Raises:



30
31
32
33
34
# File 'lib/pinecone.rb', line 30

def base_uri
  return @base_uri if @base_uri

  raise ConfigurationError, "Pinecone domain not set"
end

#environmentObject

Raises:



36
37
38
39
40
# File 'lib/pinecone.rb', line 36

def environment
  return @environment if @environment

  raise ConfigurationError, "Pinecone environment not set"
end