Class: Secrets

Inherits:
AppConfig show all
Defined in:
lib/secrets.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AppConfig

load, #load

Constructor Details

#initialize(filename = "") ⇒ Secrets

Returns a new instance of Secrets.



35
36
37
# File 'lib/secrets.rb', line 35

def initialize(filename = "")
	@filename = filename.empty? ? Secrets.default_filename : actual_filename_for(filename)
end

Class Method Details

.config_path_for(env) ⇒ Object



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

def config_path_for(env)
	File.exist?(ejson_path_for(env)) ? ejson_path_for(env) : json_path_for(env)
end

.default_filenameObject



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

def default_filename
	config_path_for(Environment.environment)
end