Class: Leeloo::KeystoreController

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(name, path) ⇒ Object



120
121
122
123
# File 'lib/leeloo/controller.rb', line 120

def add name, path
  @preferences.add_keystore({"name" => name, "path" => path, "cypher" => "gpg", "vc" => "git"})
  @preferences.keystore(name).init
end

#displayObject



136
137
138
# File 'lib/leeloo/controller.rb', line 136

def display
  @output.render_preferences @preferences
end

#initObject



133
134
135
# File 'lib/leeloo/controller.rb', line 133

def init
  @keystore.init
end

#remove(name) ⇒ Object



124
125
126
# File 'lib/leeloo/controller.rb', line 124

def remove name
  @preferences.remove_keystore name
end

#set_default(name) ⇒ Object



127
128
129
# File 'lib/leeloo/controller.rb', line 127

def set_default name
  @preferences.set_default_keystore name
end

#syncObject



130
131
132
# File 'lib/leeloo/controller.rb', line 130

def sync
  @keystore.sync
end