Class: Keystorage::Command::Base

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

Direct Known Subclasses

Get, Help, List, Set

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Base

Returns a new instance of Base.



5
6
7
# File 'lib/keystorage/command/base.rb', line 5

def initialize(options)
  @file = options[:file]
end

Class Method Details

.helpObject



19
20
21
# File 'lib/keystorage/command/base.rb', line 19

def help
  "TODO: HELP IS NOT DESCRIBED YET."
end

.run(argv, options) ⇒ Object



10
11
12
13
14
15
16
17
# File 'lib/keystorage/command/base.rb', line 10

def run(argv,options)
  begin
    self.new(options).execute(argv)
  rescue =>e
    puts "Error: \n    %s\n\n" % e
    puts help
  end
end