Class: GitGed::CLI
- Inherits:
-
Object
- Object
- GitGed::CLI
- Defined in:
- lib/git-ged/cli.rb
Instance Method Summary collapse
-
#run ⇒ Object
def initialize @options = {}.
Instance Method Details
#run ⇒ Object
def initialize
@options = {}
self.appname = "git ged"
global_options do |opts|
opts.banner = "Usage: #{appname} [options] [subcommand [options]]"
opts.separator ""
opts.separator "Global options are:"
opts.on("-v", "--[no-]verbose", "Show git-ged & grit debug") do |v|
GitGed.debug = v
end
end
add_help_option
command :init do |opts|
opts.banner = "Usage: #{appname} init -m msg [repo]"
opts.description = "Initializes a new git-ged repo"
opts.separator ""
opts.separator "Options:"
opts.on "-m INTENT", "--message INTENT" do |intent|
@options[:intent] = intent
end
end
end
41 42 43 44 45 46 47 48 |
# File 'lib/git-ged/cli.rb', line 41 def run # cmd = opt_parse() # if cmd # Repo.new.send cmd, ARGV, @options # else # puts global_options { |opts| opts } # end end |