Sha256: 1612c914e8e5a2539a60958e0045b9363926abcb755d5e614d29ab6bbda26cb4

Contents?: true

Size: 696 Bytes

Versions: 15

Compression:

Stored size: 696 Bytes

Contents

require 'vagrant'
module Oscar
  class Command < Vagrant.plugin('2', :command)

    require 'oscar/command/helpers'
    include Oscar::Command::Helpers

    require 'oscar/command/init'
    require 'oscar/command/init_vms'

    def initialize(argv, env)
      @argv     = argv
      @env      = env
      @cmd_name = 'oscar'

      split_argv
      register_subcommands
    end

    def execute
      invoke_subcommand
    end

    private

    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
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
oscar-0.6.0 lib/oscar/command.rb
oscar-0.5.6 lib/oscar/command.rb
oscar-0.5.5 lib/oscar/command.rb
oscar-0.5.4 lib/oscar/command.rb
oscar-0.5.3 lib/oscar/command.rb
oscar-0.5.2 lib/oscar/command.rb
oscar-0.5.1 lib/oscar/command.rb
oscar-0.5.0 lib/oscar/command.rb
oscar-0.4.3 lib/oscar/command.rb
oscar-0.4.2 lib/oscar/command.rb
oscar-0.4.1 lib/oscar/command.rb
oscar-0.4.0 lib/oscar/command.rb
oscar-0.3.2 lib/oscar/command.rb
oscar-0.3.1 lib/oscar/command.rb
oscar-0.3.0 lib/oscar/command.rb