Class: Shippy::Secrets
- Inherits:
-
Object
- Object
- Shippy::Secrets
- Defined in:
- lib/shippy/secrets.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #fetch(app, name) ⇒ Object
-
#initialize(file) ⇒ Secrets
constructor
A new instance of Secrets.
Constructor Details
#initialize(file) ⇒ Secrets
Returns a new instance of Secrets.
5 6 7 |
# File 'lib/shippy/secrets.rb', line 5 def initialize(file) @data = YAML.load_file(file).deep_symbolize_keys end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/shippy/secrets.rb', line 3 def data @data end |
Instance Method Details
#fetch(app, name) ⇒ Object
9 10 11 12 13 |
# File 'lib/shippy/secrets.rb', line 9 def fetch(app, name) data .fetch(app.to_sym) .fetch(name.to_sym) end |