Class: RubyEdit::CLI
- Inherits:
-
Thor
- Object
- Thor
- RubyEdit::CLI
- Defined in:
- lib/ruby_edit/cli.rb
Overview
Handle the application command line parsing and the dispatch to various command objects
Constant Summary collapse
- Error =
Error raised by this runner
Class.new(StandardError)
Instance Method Summary collapse
Instance Method Details
#configure ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'lib/ruby_edit/cli.rb', line 42 def configure(*) if [:help] invoke :help, ['configure'] else require_relative 'commands/configure' RubyEdit::Commands::Configure.new().execute end end |
#edit ⇒ Object
57 58 59 60 61 62 63 64 65 66 |
# File 'lib/ruby_edit/cli.rb', line 57 def edit(*) if [:help] invoke :help, ['edit'] elsif .empty? invoke :help else require_relative 'commands/edit' RubyEdit::Commands::Edit.new().execute end end |