Class: Bashly::CLI
- Inherits:
-
Object
- Object
- Bashly::CLI
- Defined in:
- lib/bashly/cli.rb
Overview
The CLI class is used by the bashly binary and forwards incoming CLI commands to the relevant Bashly::Commands class
Class Method Summary collapse
Class Method Details
.runner ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bashly/cli.rb', line 7 def self.runner runner = MisterBin::Runner.new version: Bashly::VERSION, header: 'Bashly - Bash CLI Generator', footer: "Help: m`bashly COMMAND --help`\nDocs: bu`https://bashly.dannyb.co`" runner.route 'init', to: Commands::Init runner.route 'preview', to: Commands::Preview runner.route 'validate', to: Commands::Validate runner.route 'generate', to: Commands::Generate runner.route 'add', to: Commands::Add runner.route 'doc', to: Commands::Doc runner.route 'completions', to: Commands::Completions runner.route 'render', to: Commands::Render runner.route 'shell', to: Commands::Shell unless ENV['BASHLY_SHELL'] runner end |