Class: DevPKI::SUBCLI::CA
- Inherits:
-
Thor
- Object
- Thor
- DevPKI::SUBCLI::CA
- Defined in:
- lib/devpki/cli/ca/init.rb,
lib/devpki/cli/ca/_hack.rb,
lib/devpki/cli/ca/delete.rb
Class Method Summary collapse
-
.banner(command, namespace = nil, subcommand = nil) ⇒ Object
Hack to override the help message produced by Thor.
Instance Method Summary collapse
Class Method Details
.banner(command, namespace = nil, subcommand = nil) ⇒ Object
Hack to override the help message produced by Thor. github.com/wycats/thor/issues/261#issuecomment-16880836
10 11 12 |
# File 'lib/devpki/cli/ca/_hack.rb', line 10 def self.(command, namespace = nil, subcommand = nil) "#{basename} ca #{command.usage}" end |
Instance Method Details
#delete(id = 0) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/devpki/cli/ca/delete.rb', line 18 def delete(id=0) if [:all] DevPKI::DataDirectory::reset_to_empty else DevPKI::CA.delete(id) puts "CA database deleted." end end |
#init(id = "default") ⇒ Object
26 27 28 |
# File 'lib/devpki/cli/ca/init.rb', line 26 def init(id="default") DevPKI::CA.init(id, [:name], [:"with-parent"]) end |