Sha256: a0d2910a5d99d6f914ab5c1c495a92cf29cb4321135129f1623e9ac8f7c6b9ea

Contents?: true

Size: 793 Bytes

Versions: 14

Compression:

Stored size: 793 Bytes

Contents

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

    require 'vagrant-hosts/command/helpers'
    include VagrantHosts::Command::Helpers

    require 'vagrant-hosts/addresses'


    require 'vagrant-hosts/command/puppetize'
    require 'vagrant-hosts/command/list'

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

      split_argv
      register_subcommands

    end

    def execute
      invoke_subcommand
    end

    private

    def register_subcommands
      @subcommands = Vagrant::Registry.new

      @subcommands.register('puppetize') do
        VagrantHosts::Command::Puppetize
      end

      @subcommands.register('list') do
        VagrantHosts::Command::List
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
vagrant-hosts-2.5.0 lib/vagrant-hosts/command.rb
vagrant-hosts-2.4.0 lib/vagrant-hosts/command.rb
vagrant-hosts-2.3.0 lib/vagrant-hosts/command.rb
vagrant-hosts-2.2.4 lib/vagrant-hosts/command.rb
vagrant-hosts-2.2.3 lib/vagrant-hosts/command.rb
vagrant-hosts-2.2.2 lib/vagrant-hosts/command.rb
vagrant-hosts-2.2.1 lib/vagrant-hosts/command.rb
vagrant-hosts-2.2.0 lib/vagrant-hosts/command.rb
vagrant-hosts-2.1.5 lib/vagrant-hosts/command.rb
vagrant-hosts-2.1.4 lib/vagrant-hosts/command.rb
vagrant-hosts-2.1.3 lib/vagrant-hosts/command.rb
vagrant-hosts-2.1.2 lib/vagrant-hosts/command.rb
vagrant-hosts-2.1.1 lib/vagrant-hosts/command.rb
vagrant-hosts-2.1.0 lib/vagrant-hosts/command.rb