Class: PEBuild::Command::Base

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(argv, env) ⇒ Base

Returns a new instance of Base.



9
10
11
12
13
14
15
16
17
18
# File 'lib/pe_build/command/base.rb', line 9

def initialize(argv, env)
  super
  split_argv

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

Class Method Details

.synopsisObject



5
6
7
# File 'lib/pe_build/command/base.rb', line 5

def self.synopsis
  'Commands related to PE Installation'
end

Instance Method Details

#executeObject



20
21
22
23
24
25
26
# File 'lib/pe_build/command/base.rb', line 20

def execute
  if @subcommand
    execute_subcommand
  else
    print_help
  end
end