class Oscar::Command

Public Class Methods

new(argv, env) click to toggle source
# File lib/oscar/command.rb, line 11
def initialize(argv, env)
  @argv     = argv
  @env      = env
  @cmd_name = 'oscar'

  split_argv
  register_subcommands
end

Public Instance Methods

execute() click to toggle source
# File lib/oscar/command.rb, line 20
def execute
  invoke_subcommand
end

Private Instance Methods

register_subcommands() click to toggle source
# File lib/oscar/command.rb, line 26
def register_subcommands
  @subcommands = Vagrant::Registry.new

  @subcommands.register('init') do
    Oscar::Command::Init
  end

  @subcommands.register('init-vms') do
    Oscar::Command::InitVMs
  end
end