Class: ChefVault::Certificate

Inherits:
Object
  • Object
show all
Defined in:
lib/chef-vault/certificate.rb

Instance Method Summary collapse

Constructor Details

#initialize(vault, name) ⇒ Certificate

Returns a new instance of Certificate.



18
19
20
# File 'lib/chef-vault/certificate.rb', line 18

def initialize(vault, name)
  @item = ChefVault::Item.load(vault, name)
end

Instance Method Details

#[](key) ⇒ Object



22
23
24
# File 'lib/chef-vault/certificate.rb', line 22

def [](key)
  @item[key]
end

#decrypt_contentsObject



26
27
28
29
# File 'lib/chef-vault/certificate.rb', line 26

def decrypt_contents
  $stdout.puts "WARNING: This method is deprecated, please switch to item['value'] calls"
  @item["contents"]
end