Sha256: 611cac0bdac20866869389de951d3a6ee35f05c5945629b83d2c2aa33dae042d

Contents?: true

Size: 379 Bytes

Versions: 3

Compression:

Stored size: 379 Bytes

Contents

require '__app__'
require 'json'

module __App__
  module Commands
    class Example < __App__::Command
      def call(_args, _name)
        puts 'neato'

        if rand < 0.05
          raise(CLI::Kit::Abort, "you got unlucky!")
        end
      end

      def self.help
        "A dummy command.\nUsage: {{command:#{__App__::TOOL_NAME} example}}"
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cli-kit-3.1.0 gen/template/lib/__app__/commands/example.rb
cli-kit-3.0.1 gen/template/lib/__app__/commands/example.rb
cli-kit-3.0.0 gen/template/lib/__app__/commands/example.rb