class Swamp::CLIDSL

Public Class Methods

new(cli) click to toggle source
# File lib/swamp/cli_dsl.rb, line 7
def initialize(cli)
  @cli = cli
end

Public Instance Methods

command(name, &block) click to toggle source
# File lib/swamp/cli_dsl.rb, line 11
def command(name, &block)
  command = Command.new(@cli, name)
  CommandDSL.new(command).instance_eval(&block)
  @cli.add(command)
end