Class: Hbtrack::Command

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

Instance Method Summary collapse

Constructor Details

#initialize(store_path, options) ⇒ Command

Returns a new instance of Command.



7
8
9
10
11
12
13
# File 'lib/hbtrack/command.rb', line 7

def initialize(store_path, options)
  @all = false
  @option_parser = create_option_parser
  @store_path = store_path
  unprocess_option = @option_parser.parse(options)
  @names = unprocess_option
end

Instance Method Details

#create_option_parserObject



23
24
25
# File 'lib/hbtrack/command.rb', line 23

def create_option_parser
  raise 'Not Implemented'
end

#executeObject



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

def execute
  help
end

#helpObject



27
28
29
# File 'lib/hbtrack/command.rb', line 27

def help
  @option_parser.help
end

#local_storeObject



15
16
17
# File 'lib/hbtrack/command.rb', line 15

def local_store
  @store ||= Hbtrack::Database::SequelStore.new(name: @store_path)
end