class Vagrant::Plugin::V2::Components

This is the container class for the components of a single plugin. This allows us to separate the plugin class which defines the components, and the actual container of those components. This removes a bit of state overhead from the plugin class itself.

Attributes

action_hooks[R]

This contains all the action hooks.

@return [Hash<Symbol, Array>]

commands[R]

This contains all the command plugins by name, and returns the command class and options. The command class is wrapped in a Proc so that it can be lazy loaded.

@return [Registry<Symbol, Array<Proc, Hash>>]

configs[R]

This contains all the configuration plugins by scope.

@return [Hash<Symbol, Registry>]

guest_capabilities[R]

This contains all the registered guest capabilities.

@return [Hash<Symbol, Registry>]

guests[R]

This contains all the guests and their parents.

@return [Registry<Symbol, Array<Class, Symbol>>]

host_capabilities[R]

This contains all the registered host capabilities.

@return [Hash<Symbol, Registry>]

hosts[R]

This contains all the hosts and their parents.

@return [Registry<Symbol, Array<Class, Symbol>>]

provider_capabilities[R]

This contains all the registered provider capabilities.

@return [Hash<Symbol, Registry>]

providers[R]

This contains all the provider plugins by name, and returns the provider class and options.

@return [Hash<Symbol, Registry>]

pushes[R]

This contains all the push implementations by name.

@return [Registry<Symbol, Array<Class, Hash>>]

synced_folder_capabilities[R]

This contains all the registered synced folder capabilities.

@return [Hash<Symbol, Registry>]

synced_folders[R]

This contains all the synced folder implementations by name.

@return [Registry<Symbol, Array<Class, Integer>>]

Public Class Methods

new() click to toggle source
# File lib/vagrant/plugin/v2/components.rb, line 72
def initialize
  # The action hooks hash defaults to []
  @action_hooks = Hash.new { |h, k| h[k] = [] }

  @commands = Registry.new
  @configs = Hash.new { |h, k| h[k] = Registry.new }
  @guests  = Registry.new
  @guest_capabilities = Hash.new { |h, k| h[k] = Registry.new }
  @hosts   = Registry.new
  @host_capabilities = Hash.new { |h, k| h[k] = Registry.new }
  @providers = Registry.new
  @provider_capabilities = Hash.new { |h, k| h[k] = Registry.new }
  @pushes = Registry.new
  @synced_folders = Registry.new
  @synced_folder_capabilities = Hash.new { |h, k| h[k] = Registry.new }
end