Class: Dawupxlrgo::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/dawupxlrgo/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.



67
68
69
# File 'lib/dawupxlrgo/configuration.rb', line 67

def array_serialization
  @array_serialization
end

.basic_auth_passwordObject

Returns the value of attribute basic_auth_password.



73
74
75
# File 'lib/dawupxlrgo/configuration.rb', line 73

def basic_auth_password
  @basic_auth_password
end

.basic_auth_user_nameObject

Returns the value of attribute basic_auth_user_name.



72
73
74
# File 'lib/dawupxlrgo/configuration.rb', line 72

def basic_auth_user_name
  @basic_auth_user_name
end

.environmentObject

Returns the value of attribute environment.



68
69
70
# File 'lib/dawupxlrgo/configuration.rb', line 68

def environment
  @environment
end

.environmentsObject

Returns the value of attribute environments.



69
70
71
# File 'lib/dawupxlrgo/configuration.rb', line 69

def environments
  @environments
end

.portObject

Returns the value of attribute port.



70
71
72
# File 'lib/dawupxlrgo/configuration.rb', line 70

def port
  @port
end

.suitesObject

Returns the value of attribute suites.



71
72
73
# File 'lib/dawupxlrgo/configuration.rb', line 71

def suites
  @suites
end

Class Method Details

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

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

Parameters:

Returns:



55
56
57
58
59
60
61
62
63
# File 'lib/dawupxlrgo/configuration.rb', line 55

def self.get_base_uri(server = Server::DEFAULT)
  parameters = {
    'port' => port,
    'suites' => suites
  }
  APIHelper.append_url_with_template_parameters(
    environments[environment][server], parameters
  )
end