Sha256: e0c0af7c3b01a91005e32110770bc998b4e0adf2770c90759a648a88e7c3434b

Contents?: true

Size: 357 Bytes

Versions: 8

Compression:

Stored size: 357 Bytes

Contents

module Gumdrop

  class << self

    # Allows addition of CLI commands from Gumdrop file:
    #
    #  Gumdrop.cli do
    #    desc 'ping'
    #    method_option :loud, default:false
    #    def ping
    #      say options[:loud] ? 'PONG!' : 'pong'
    #    end
    #  end
    #
    def cli(&block)
      CLI::Internal.class_eval &block
    end

  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gumdrop-1.1.3 lib/gumdrop/cli.rb
gumdrop-1.1.2 lib/gumdrop/cli.rb
gumdrop-1.1.1 lib/gumdrop/cli.rb
gumdrop-1.1.0 lib/gumdrop/cli.rb
gumdrop-1.0.3 lib/gumdrop/cli.rb
gumdrop-1.0.2 lib/gumdrop/cli.rb
gumdrop-1.0.1 lib/gumdrop/cli.rb
gumdrop-1.0.0 lib/gumdrop/cli.rb