Module: Ragoon

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

Defined Under Namespace

Modules: XML Classes: Client, Error, Services

Constant Summary collapse

VERSION =
'1.1.0'
@@secret_options =
{}

Class Method Summary collapse

Class Method Details

.default_optionsObject



17
18
19
20
21
22
23
24
25
# File 'lib/ragoon.rb', line 17

def self.default_options
  {
    endpoint: ENV['GAROON_ENDPOINT'] || raise_option_error('endpoint'),
    username: ENV['GAROON_USERNAME'] || raise_option_error('username'),
    password: ENV['GAROON_PASSWORD'] || raise_option_error('password'),
    version:  ENV['GAROON_VERSION']  || 4,
    retry:    ENV['GAROON_RETRY']    || 10,
  }
end

.raise_option_error(type) ⇒ Object



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

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