Method: Open#parser

Defined in:
lib/git-utils/open.rb

#parserObject



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/git-utils/open.rb', line 5

def parser
  OptionParser.new do |opts|
    opts.banner = "Usage: git open"
    opts.on("-p", "--print", "print URL instead of opening") do |opt|
      self.options.print = opt
    end
    opts.on_tail("-h", "--help", "this usage guide") do
      puts opts.to_s; exit 0
    end
  end
end