Class: MultaArcana
- Inherits:
-
Object
- Object
- MultaArcana
- Defined in:
- lib/multa_arcana/version.rb,
lib/multa_arcana/multa_arcana.rb
Constant Summary collapse
- VERSION =
"1.1.3"
- DEFAULT_SECRET_FILE =
'secrets.yml'
- @@secrets =
nil
- @@secret_file =
nil
Class Method Summary collapse
-
.secret_for(tag, fname = nil) ⇒ Object
Load secrets from the default file (
secrets.yml
, orconfig/secrets.yml
for a Rails application) or from the file specified.
Class Method Details
.secret_for(tag, fname = nil) ⇒ Object
Load secrets from the default file (secrets.yml
, or config/secrets.yml
for a Rails application) or from the file specified. The file is sticky; the first call to secret_for
sets the file in use, and afterwards all following secret_for calls use the data from a cache.
12 13 14 15 |
# File 'lib/multa_arcana/multa_arcana.rb', line 12 def self.secret_for(tag, fname = nil) load_file(fname) @@secrets[tag.to_s] end |