Sha256: 0f2b7d42a04f5243e6ce489da3b773d9d532e70533504f35db0c590b88151375

Contents?: true

Size: 567 Bytes

Versions: 8

Compression:

Stored size: 567 Bytes

Contents

# frozen_string_literal: true

require 'thor'

module Vtk
  # Handle the application command line parsing
  # and the dispatch to various command objects
  #
  # @api public
  class CLI < Thor
    # Error raised by this runner
    Error = Class.new(StandardError)

    desc 'version', 'vtk version'
    def version
      require_relative 'version'
      puts "v#{Vtk::VERSION}"
    end
    map %w[--version -v] => :version

    require_relative 'commands/module'
    register Vtk::Commands::Module, 'module', 'module [SUBCOMMAND]', 'Command description...'
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
vtk-0.2.6 lib/vtk/cli.rb
vtk-0.2.5 lib/vtk/cli.rb
vtk-0.2.4 lib/vtk/cli.rb
vtk-0.2.3 lib/vtk/cli.rb
vtk-0.2.2 lib/vtk/cli.rb
vtk-0.2.1 lib/vtk/cli.rb
vtk-0.2.0 lib/vtk/cli.rb
vtk-0.1.0 lib/vtk/cli.rb