Class: Secrets
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(filename = "") ⇒ Secrets
constructor
A new instance of Secrets.
Methods inherited from AppConfig
Constructor Details
#initialize(filename = "") ⇒ Secrets
Returns a new instance of Secrets.
31 32 33 |
# File 'lib/secrets.rb', line 31 def initialize(filename = "") @filename = filename.empty? ? Secrets.default_filename : actual_filename_for(filename) end |
Class Method Details
.app_config_path ⇒ Object
16 17 18 |
# File 'lib/secrets.rb', line 16 def app_config_path (Options.get("secrets.path") || default_filename) end |
.config_path_for(env) ⇒ Object
12 13 14 |
# File 'lib/secrets.rb', line 12 def config_path_for(env) File.exist?(ejson_path_for(env)) ? ejson_path_for(env) : json_path_for(env) end |
.default_filename ⇒ Object
8 9 10 |
# File 'lib/secrets.rb', line 8 def default_filename config_path_for(Environment.environment) end |