Class: Leeloo::SecretsController

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

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ SecretsController

Returns a new instance of SecretsController.



33
34
35
36
# File 'lib/leeloo/controller.rb', line 33

def initialize options
	super options
	@secrets = @keystore.secrets
end

Instance Method Details

#displayObject



43
44
45
# File 'lib/leeloo/controller.rb', line 43

def display
	@output.render_secrets @secrets
end

#listObject



40
41
42
# File 'lib/leeloo/controller.rb', line 40

def list
	@secrets
end

#search(name) ⇒ Object



37
38
39
# File 'lib/leeloo/controller.rb', line 37

def search name
	@secrets = @secrets.select { |secret| secret.name.downcase.include? name.downcase } || []
end