Sha256: 20125e4aa3375cdc2195a2e24db0ed80e2120068d494e08497b38348b5fceb0b

Contents?: true

Size: 398 Bytes

Versions: 1

Compression:

Stored size: 398 Bytes

Contents

module Slappy
  class CLI < Thor
    desc 'start', 'slappy start'
    def start
      build_command(:run).call
    end

    desc 'new [DIR_NAME]', 'create new slappy project'
    def new(dir_name = nil)
      build_command(:generator).call(dir_name)
    end

    private

    def build_command(command_name)
      "Slappy::Commands::#{command_name.to_s.camelize}".constantize.new
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slappy-0.3.0 lib/slappy/cli.rb