Module: Rdwu::Settings

Included in:
Api
Defined in:
lib/rdwu/settings.rb

Instance Method Summary collapse

Instance Method Details

#enabled?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/rdwu/settings.rb', line 4

def enabled?
  %w[true on 1 enabled yes].include?(ENV['RDWU_ENABLED']&.downcase)
end

#hostObject



12
13
14
# File 'lib/rdwu/settings.rb', line 12

def host
  ENV['RDWU_HOST']
end

#timeout_secondsObject



16
17
18
# File 'lib/rdwu/settings.rb', line 16

def timeout_seconds
  (ENV['RDWU_TIMEOUT_SECONDS'] || 3).to_i
end

#tokenObject



8
9
10
# File 'lib/rdwu/settings.rb', line 8

def token
  ENV['RDWU_API_KEY']
end