Method: Vagrant::NodeMaster::BoxCommand#initialize

Defined in:
lib/vagrant-nodemaster/remote/remoteboxcommand.rb

#initialize(argv, env) ⇒ BoxCommand

Returns a new instance of BoxCommand.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/vagrant-nodemaster/remote/remoteboxcommand.rb', line 9

def initialize(argv, env)
  super

  @main_args, @sub_command, @sub_args = split_main_and_subcommand(argv)

#     puts "MAIN ARGS #{@main_args}"
#     puts "SUB COMMAND #{@sub_command}"
#     puts "SUB ARGS #{@sub_args}"

  @subcommands = Vagrant::Registry.new
#          @subcommands.register(:add) do
#            require File.expand_path("../add", __FILE__)
#            Add
#          end
#
  @subcommands.register(:list) do
    require File.expand_path("../remoteboxlist", __FILE__)
    BoxList
  end
  
  @subcommands.register(:remove) do
    require File.expand_path("../remoteboxdelete", __FILE__)
    BoxDelete
  end
  
  @subcommands.register(:add) do
    require File.expand_path("../remoteboxadd", __FILE__)
    BoxAdd
  end

  @subcommands.register(:downloads) do
    require File.expand_path("../remoteboxdownload", __FILE__)
    BoxDownload
  end
          
end