Class: DashX::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#base_uriObject

Returns the value of attribute base_uri.



5
6
7
# File 'lib/dashx/config.rb', line 5

def base_uri
  @base_uri
end

#private_keyObject

Returns the value of attribute private_key.



7
8
9
# File 'lib/dashx/config.rb', line 7

def private_key
  @private_key
end

#public_keyObject

Returns the value of attribute public_key.



6
7
8
# File 'lib/dashx/config.rb', line 6

def public_key
  @public_key
end

#target_environmentObject

Returns the value of attribute target_environment.



8
9
10
# File 'lib/dashx/config.rb', line 8

def target_environment
  @target_environment
end

Instance Method Details

#validate!Object

Raises:



10
11
12
13
14
# File 'lib/dashx/config.rb', line 10

def validate!
  raise ConfigurationError, 'public_key must be set' if public_key.nil? || public_key.empty?
  raise ConfigurationError, 'private_key must be set' if private_key.nil? || private_key.empty?
  raise ConfigurationError, 'target_environment must be set' if target_environment.nil? || target_environment.empty?
end