Method: Open#parser
- Defined in:
- lib/git-utils/open.rb
#parser ⇒ Object
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. = "Usage: git open" opts.on("-p", "--print", "print URL instead of opening") do |opt| self..print = opt end opts.on_tail("-h", "--help", "this usage guide") do puts opts.to_s; exit 0 end end end |