Class: GitGoggles::CLI

Inherits:
Rack::Server
  • Object
show all
Defined in:
lib/git_goggles/cli.rb

Defined Under Namespace

Classes: Options

Instance Method Summary collapse

Constructor Details

#initialize(options = nil) ⇒ CLI

Returns a new instance of CLI.



35
36
37
# File 'lib/git_goggles/cli.rb', line 35

def initialize(options = nil)
  super
end

Instance Method Details

#opt_parserObject



39
40
41
# File 'lib/git_goggles/cli.rb', line 39

def opt_parser
  Options.new
end

#startObject



43
44
45
46
47
48
49
# File 'lib/git_goggles/cli.rb', line 43

def start
  throw 'Must specifify a root_dir' unless options[:root_dir]
  GitGoggles.root_dir = options[:root_dir]
  puts ">> Using root directory #{GitGoggles.root_dir}"

  super
end