Sha256: 185b2001ffede4e838b4aa523527f62e22b9796806f52c3241862274a0ddaf99

Contents?: true

Size: 927 Bytes

Versions: 7

Compression:

Stored size: 927 Bytes

Contents

module Vagrant
  module Plugin
    module V2
      # 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.
      class Components
        # This contains all the action hooks.
        #
        # @return [Hash<Symbol, Array>]
        attr_reader :action_hooks

        # This contains all the configuration plugins by scope.
        #
        # @return [Hash<Symbol, Registry>]
        attr_reader :configs

        def initialize
          # The action hooks hash defaults to []
          @action_hooks = Hash.new { |h, k| h[k] = [] }

          # Create the configs hash which defaults to a registry
          @configs = Hash.new { |h, k| h[k] = Registry.new }
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
vagrantup-1.1.3 lib/vagrant/plugin/v2/components.rb
vagrantup-1.1.2 lib/vagrant/plugin/v2/components.rb
vagrantup-1.1.1 lib/vagrant/plugin/v2/components.rb
vagrantup-1.1.0 lib/vagrant/plugin/v2/components.rb
vagrantup-1.1.4 lib/vagrant/plugin/v2/components.rb
vagrant-actionio-0.0.9 vendor/bundle/bundler/gems/vagrant-c74251a1d9c0/lib/vagrant/plugin/v2/components.rb
vagrant-lxc-0.0.1 vendor/vagrant/lib/vagrant/plugin/v2/components.rb