Class: OSESecret
- Inherits:
-
Object
- Object
- OSESecret
- Defined in:
- lib/models/ose_secret.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#ose_secret ⇒ Object
readonly
Returns the value of attribute ose_secret.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(name, ose_secret) ⇒ OSESecret
constructor
A new instance of OSESecret.
- #to_encryptable ⇒ Object
- #to_yaml ⇒ Object
Constructor Details
#initialize(name, ose_secret) ⇒ OSESecret
Returns a new instance of OSESecret.
6 7 8 9 |
# File 'lib/models/ose_secret.rb', line 6 def initialize(name, ose_secret) @name = name @ose_secret = ose_secret end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/models/ose_secret.rb', line 4 def name @name end |
#ose_secret ⇒ Object (readonly)
Returns the value of attribute ose_secret.
4 5 6 |
# File 'lib/models/ose_secret.rb', line 4 def ose_secret @ose_secret end |
Class Method Details
.all ⇒ Object
38 39 40 |
# File 'lib/models/ose_secret.rb', line 38 def all OSEAdapter.new.fetch_all_secrets.map { |s| OSESecretSerializer.from_yaml(s) } end |
.find_by_name(name) ⇒ Object
34 35 36 |
# File 'lib/models/ose_secret.rb', line 34 def find_by_name(name) OSESecretSerializer.from_yaml(OSEAdapter.new.fetch_secret(name)) end |
.from_yaml(yaml) ⇒ Object
30 31 32 |
# File 'lib/models/ose_secret.rb', line 30 def from_yaml(yaml) OSESecretSerializer.from_yaml(yaml) end |
Instance Method Details
#to_encryptable ⇒ Object
11 12 13 |
# File 'lib/models/ose_secret.rb', line 11 def to_encryptable OSESecretSerializer.to_encryptable(self) end |
#to_yaml ⇒ Object
15 16 17 |
# File 'lib/models/ose_secret.rb', line 15 def to_yaml OSESecretSerializer.to_yaml(self) end |