Class: Bashly::CLI

Inherits:
Object
  • Object
show all
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

.runnerObject



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/bashly/cli.rb', line 7

def self.runner
  runner = MisterBin::Runner.new version: Bashly::VERSION,
    header: "Bashly - Bash CLI Generator"

  runner.route 'init',      to: Commands::Init
  runner.route 'preview',   to: Commands::Preview
  runner.route 'generate',  to: Commands::Generate
  runner.route 'add',       to: Commands::Add

  runner
end