# File lib/heroku/command/base.rb, line 131 def self.extract_options(help) help.split("\n").map(&:strip).select do |line| line =~ /^-(.+)#(.+)/ end.inject({}) do |hash, line| description = line.split("#", 2).last.strip long = line.match(/--([A-Za-z\- ]+)/)[1].strip short = line.match(/-([A-Za-z ])/)[1].strip hash.update(long.split(" ").first => { :desc => description, :short => short, :long => long }) end end