Class: Keystorage::Command::Set

Inherits:
Base
  • Object
show all
Defined in:
lib/keystorage/command/set.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize, run

Constructor Details

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

Class Method Details

.helpObject



14
15
16
17
18
19
20
21
# File 'lib/keystorage/command/set.rb', line 14

def help
  "Description:
    store key to file

Usage:
    keystrage [options] set group name key
"
end

Instance Method Details

#execute(argv) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/keystorage/command/set.rb', line 6

def execute(argv)
  group = argv.shift
  var = argv.shift
  val = argv.shift
  ks = Manager.new(@file)
  ks.set(group,var,val)
end