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
41 42 43 44 45 46 47 48 |
# File 'lib/ruby_edit/cli.rb', line 41 def configure(*) if [:help] invoke :help, ['configure'] else require_relative 'commands/configure' RubyEdit::Commands::Configure.new().execute end end |
#edit ⇒ Object
58 59 60 61 62 63 64 65 66 67 |
# File 'lib/ruby_edit/cli.rb', line 58 def edit(*) if [:help] invoke :help, ['edit'] elsif .empty? invoke :help else require_relative 'commands/edit' RubyEdit::Commands::Edit.new().execute end end |