Class: Foreplay::Engine::Secrets
- Inherits:
-
Object
- Object
- Foreplay::Engine::Secrets
- Defined in:
- lib/foreplay/engine/secrets.rb,
lib/foreplay/engine/secrets/location.rb
Defined Under Namespace
Classes: Location
Instance Attribute Summary collapse
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#secret_locations ⇒ Object
readonly
Returns the value of attribute secret_locations.
Instance Method Summary collapse
- #fetch ⇒ Object
-
#initialize(e, sl) ⇒ Secrets
constructor
A new instance of Secrets.
- #location_secrets(secret_location) ⇒ Object
Constructor Details
#initialize(e, sl) ⇒ Secrets
Returns a new instance of Secrets.
8 9 10 11 |
# File 'lib/foreplay/engine/secrets.rb', line 8 def initialize(e, sl) @environment = e @secret_locations = sl end |
Instance Attribute Details
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
6 7 8 |
# File 'lib/foreplay/engine/secrets.rb', line 6 def environment @environment end |
#secret_locations ⇒ Object (readonly)
Returns the value of attribute secret_locations.
6 7 8 |
# File 'lib/foreplay/engine/secrets.rb', line 6 def secret_locations @secret_locations end |
Instance Method Details
#fetch ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/foreplay/engine/secrets.rb', line 13 def fetch return unless secret_locations secrets = {} secret_locations.each { |secret_location| secrets.merge! location_secrets(secret_location) } secrets end |
#location_secrets(secret_location) ⇒ Object
21 22 23 |
# File 'lib/foreplay/engine/secrets.rb', line 21 def location_secrets(secret_location) Location.new(secret_location, environment).secrets end |