Sha256: c7d1875441d60aa5f5a61ff9e6155c9ffba24ad928467e4c766c4cba8301781c

Contents?: true

Size: 629 Bytes

Versions: 1

Compression:

Stored size: 629 Bytes

Contents

module VagrantPlugins
  module Environments
    class Environment < Vagrant.plugin(2, :config)

      def define(config, &block)
        settings = config.environments.data
        settings["machines"].each do |name, options|
          machine_name = [config.environments.active, name].join('__') 
          config.vm.define machine_name do |machine|
            block.call(machine, machine_name, options, settings["configs"])
          end
        end
      end

      def validate(_)
        errors = _detected_errors
        { 'environment' => errors }
      end

    end #Environment
  end #Envrionments
end # VagrantPlugins

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vagrant-environments-0.1.6 lib/vagrant-environments/environment.rb