Class: GsmEnv::Secret
- Inherits:
-
Object
- Object
- GsmEnv::Secret
- Defined in:
- lib/gsm_env/secret.rb
Defined Under Namespace
Classes: InvalidName
Instance Attribute Summary collapse
-
#secret ⇒ Object
readonly
Returns the value of attribute secret.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(secret, version) ⇒ Secret
constructor
A new instance of Secret.
- #name ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(secret, version) ⇒ Secret
Returns a new instance of Secret.
9 10 11 12 |
# File 'lib/gsm_env/secret.rb', line 9 def initialize(secret, version) @secret = secret @version = version end |
Instance Attribute Details
#secret ⇒ Object (readonly)
Returns the value of attribute secret.
7 8 9 |
# File 'lib/gsm_env/secret.rb', line 7 def secret @secret end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
7 8 9 |
# File 'lib/gsm_env/secret.rb', line 7 def version @version end |
Instance Method Details
#name ⇒ Object
14 15 16 |
# File 'lib/gsm_env/secret.rb', line 14 def name @name ||= extract_secret_name_from(secret.name) end |
#value ⇒ Object
18 19 20 |
# File 'lib/gsm_env/secret.rb', line 18 def value version.payload.data&.chomp end |