Class: PansophyAuthenticator::Configuration::FromEnv

Inherits:
Object
  • Object
show all
Defined in:
lib/pansophy_authenticator/configuration/from_env.rb

Instance Method Summary collapse

Constructor Details

#initialize(base_configuration) ⇒ FromEnv

Returns a new instance of FromEnv.



4
5
6
# File 'lib/pansophy_authenticator/configuration/from_env.rb', line 4

def initialize(base_configuration)
  @base_configuration = base_configuration
end

Instance Method Details

#applicationObject



21
22
23
# File 'lib/pansophy_authenticator/configuration/from_env.rb', line 21

def application
  ENV.fetch('PANSOPHY_AUTHENTICATOR_APPLICATION') { @base_configuration.application }
end

#bucket_nameObject



13
14
15
# File 'lib/pansophy_authenticator/configuration/from_env.rb', line 13

def bucket_name
  ENV.fetch('PANSOPHY_AUTHENTICATOR_BUCKET_NAME') { @base_configuration.bucket_name }
end

#file_pathObject



17
18
19
# File 'lib/pansophy_authenticator/configuration/from_env.rb', line 17

def file_path
  ENV.fetch('PANSOPHY_AUTHENTICATOR_FILE_PATH') { @base_configuration.file_path }
end

#localObject



8
9
10
11
# File 'lib/pansophy_authenticator/configuration/from_env.rb', line 8

def local
  local = ENV.fetch('PANSOPHY_AUTHENTICATOR_LOCAL') { @base_configuration.local }
  local.to_s == 'true'
end