Class: Leeloo::KeysController

Inherits:
PrivateLocalFileSystemController show all
Defined in:
lib/leeloo/controller.rb

Instance Method Summary collapse

Methods inherited from PrivateLocalFileSystemController

#initialize

Constructor Details

This class inherits a constructor from Leeloo::PrivateLocalFileSystemController

Instance Method Details

#add_key(email) ⇒ Object



57
58
59
# File 'lib/leeloo/controller.rb', line 57

def add_key email
	@keystore.add_key(email)
end

#displayObject



69
70
71
72
# File 'lib/leeloo/controller.rb', line 69

def display
	@keys = @keystore.keys
	@output.render_keys @keys
end

#remove_key(email) ⇒ Object



60
61
62
# File 'lib/leeloo/controller.rb', line 60

def remove_key email
	@keystore.remove_key(email)
end

#syncObject



63
64
65
66
67
68
# File 'lib/leeloo/controller.rb', line 63

def sync
	@keystore.secrets.each do |secret|
		phrase = @keystore.secret_from_name(secret.name).read
		@keystore.secret_from_name(secret.name).write(phrase)
	end
end