Module: Ragoon

Defined in:
lib/ragoon.rb,
lib/ragoon/version.rb

Defined Under Namespace

Modules: XML Classes: Client, Services

Constant Summary collapse

VERSION =
'0.1.1'
@@secret_options =
{}

Class Method Summary collapse

Class Method Details

.garoon_endpointObject



13
14
15
# File 'lib/ragoon.rb', line 13

def self.garoon_endpoint
  ENV['GAROON_ENDPOINT'] || secret_options[:garoon_endpoint] || raise_option_error('endpoint')
end

.garoon_passwordObject



21
22
23
# File 'lib/ragoon.rb', line 21

def self.garoon_password
  ENV['GAROON_PASSWORD'] || secret_options[:garoon_password] || raise_option_error('password')
end

.garoon_usernameObject



17
18
19
# File 'lib/ragoon.rb', line 17

def self.garoon_username
  ENV['GAROON_USERNAME'] || secret_options[:garoon_username] || raise_option_error('username')
end

.raise_option_error(type) ⇒ Object



25
26
27
# File 'lib/ragoon.rb', line 25

def self.raise_option_error(type)
  raise "must specify garoon_#{type} by ENV or `./.secret_options`."
end