Class: Arcanus::Command::Unlock

Inherits:
Base
  • Object
show all
Defined in:
lib/arcanus/command/unlock.rb

Instance Method Summary collapse

Methods inherited from Base

description, #execute_command, from_arguments, #initialize, #run, short_name

Methods included from Utils

camel_case, deep_dup, snake_case

Constructor Details

This class inherits a constructor from Arcanus::Command::Base

Instance Method Details

#executeObject


5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/arcanus/command/unlock.rb', line 5

def execute
  return unless has_chest?
  return if already_unlocked?

  unlock_key

  ui.success "Key unlocked and saved in #{repo.unlocked_key_path}"
  ui.newline
  ui.print 'You can now view secrets with:'
  ui.info '  arcanus show'
  ui.print '...or edit secrets with:'
  ui.info '  arcanus edit'
end