Class: Calpack::Configuration

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

Overview

All configuration including auth info and base URI for the API access are configured in this class.

Defined Under Namespace

Classes: Environment, Server

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.array_serializationObject

Returns the value of attribute array_serialization.



46
47
48
# File 'lib/calpack/configuration.rb', line 46

def array_serialization
  @array_serialization
end

.environmentObject

Returns the value of attribute environment.



47
48
49
# File 'lib/calpack/configuration.rb', line 47

def environment
  @environment
end

.environmentsObject

Returns the value of attribute environments.



48
49
50
# File 'lib/calpack/configuration.rb', line 48

def environments
  @environments
end

Class Method Details

.get_base_uri(server = Server::CALCULATOR) ⇒ String

Generates the appropriate base URI for the environment and the server. required.

Parameters:

Returns:



40
41
42
# File 'lib/calpack/configuration.rb', line 40

def self.get_base_uri(server = Server::CALCULATOR)
  environments[environment][server].clone
end