Class: Raykit::Parser
- Inherits:
-
Object
- Object
- Raykit::Parser
- Defined in:
- lib/raykit/console.rb
Class Method Summary collapse
Class Method Details
.parse(options) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/raykit/console.rb', line 8 def self.parse() args = Options.new("world") opt_parser = OptionParser.new do |opts| opts. = "Usage: raykit [options]" opts.on('-l','--list','list remotes') do |list| Raykit::Git::remote_urls.each{|url| puts Rainbow(url).yellow.bright } exit end opts.on('-h','--help','help') do puts opts exit end end opt_parser.parse!() return args end |