Class: Punt

Inherits:
Object
  • Object
show all
Defined in:
lib/punt.rb

Constant Summary collapse

CMDS =
[CmdInit.new,
        CmdDeploy.new,
        CmdRemote.new,
].sort { |first, second| first.name <=> second.name }

Class Method Summary collapse

Class Method Details

.cmd(argv) ⇒ Object



25
26
27
28
29
30
31
32
# File 'lib/punt.rb', line 25

def self.cmd(argv)
    first = argv.shift
    matching_cmd = find_cmd(first)

    usage and return unless matching_cmd

    matching_cmd.run(argv)
end