Class: ChefVault::User

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

Instance Method Summary collapse

Constructor Details

#initialize(vault, username) ⇒ User

Returns a new instance of User.



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

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

Instance Method Details

#[](key) ⇒ Object



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

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

#decrypt_passwordObject



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

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