Class: PEBuild::Command::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/pe_build/command/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(argv, env) ⇒ Base

Returns a new instance of Base.



5
6
7
8
9
10
11
12
13
14
# File 'lib/pe_build/command/base.rb', line 5

def initialize(argv, env)
  super
  split_argv

  @subcommands = {
    'list'     => PEBuild::Command::List,
    'download' => PEBuild::Command::Download,
    'copy'     => PEBuild::Command::Copy,
  }
end

Instance Method Details

#executeObject



16
17
18
19
20
21
22
# File 'lib/pe_build/command/base.rb', line 16

def execute
  if @subcommand
    execute_subcommand
  else
    print_help
  end
end