Sha256: 5a7333b46559b6e774b97a633fadc2939aea381d8c1c696c14746ede2138616a

Contents?: true

Size: 939 Bytes

Versions: 1

Compression:

Stored size: 939 Bytes

Contents

require 'pry'
require 'binding_of_caller'
require 'thor'
require 'nrb/commands/script'
require 'nrb/commands/starter'
require 'nrb/commands/console'
require 'nrb/commands/generate'
require 'nrb/commands/destroy'

module Nrb
  class CLI < Thor
    register Nrb::Commands::Script, 'new', 'new <name-or-path> [OPTIONS]',
      Nrb::Commands::Script.desc
    tasks['new'].options = Nrb::Commands::Script.class_options

    register Nrb::Commands::Starter, 'start', '[s]tart',
      Nrb::Commands::Starter.desc
    map 's' => :start

    register Nrb::Commands::Console, 'console', '[c]onsole',
      Nrb::Commands::Console.desc
    map 'c' => :console

    register Nrb::Commands::Generate, 'generate', '[g]enerate <resource> <name>',
      Nrb::Commands::Generate.desc
    map 'g' => :generate

    register Nrb::Commands::Destroy, 'destroy', '[d]estroy <resource> <name>',
      Nrb::Commands::Destroy.desc
    map 'd' => :destroy
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nrb-1.0.0 lib/nrb/cli.rb