Module: Ragoon

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

Defined Under Namespace

Modules: XML Classes: Client, Services

Constant Summary collapse

VERSION =
'0.4.2'
@@secret_options =
{}

Class Method Summary collapse

Class Method Details

.garoon_endpointObject



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

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

.garoon_passwordObject



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

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

.garoon_usernameObject



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

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

.raise_option_error(type) ⇒ Object



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

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