Class: Leeloo::KeystoreFactory
- Inherits:
-
Object
- Object
- Leeloo::KeystoreFactory
- Defined in:
- lib/leeloo/keystore.rb
Class Method Summary collapse
Class Method Details
.create(keystore) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/leeloo/keystore.rb', line 9 def self.create keystore keystore_created = nil case keystore["cypher"] when "gpg" keystore_created = GpgPrivateLocalFileSystemKeystore.new keystore["name"], keystore["path"] else keystore_created = PrivateLocalFileSystemKeystore.new keystore["name"], keystore["path"] end case keystore["vc"] when "git" GitKeystoreDecorator.new keystore_created else keystore_created end end |