Class: VagrantPlugins::StartCloud::Plugin
- Inherits:
-
Object
- Object
- VagrantPlugins::StartCloud::Plugin
- Defined in:
- lib/vagrant-startcloud/plugin.rb
Class Method Summary collapse
- .components ⇒ Object
- .config_builder ⇒ Object
-
.init! ⇒ Object
Initialize plugin.
- .register(name) ⇒ Object
- .registered ⇒ Object
- .registered?(name) ⇒ Boolean
-
.setup_i18n ⇒ Object
Initialize I18n.
- .version ⇒ Object
Class Method Details
.components ⇒ Object
87 88 89 90 91 92 93 94 95 |
# File 'lib/vagrant-startcloud/plugin.rb', line 87 def components @components ||= begin c = Vagrant::Plugin::V2::Components.new c.configs[:top].register(:startcloud) { Config } c.configs[:provisioner].register(:startcloud) { Config } c.provisioners.register(:startcloud) { Provisioner } c end end |
.config_builder ⇒ Object
97 98 99 100 |
# File 'lib/vagrant-startcloud/plugin.rb', line 97 def config_builder require_relative 'config_builder' ConfigBuilder end |
.init! ⇒ Object
Initialize plugin
113 114 115 |
# File 'lib/vagrant-startcloud/plugin.rb', line 113 def self.init! setup_i18n end |
.register(name) ⇒ Object
79 80 81 |
# File 'lib/vagrant-startcloud/plugin.rb', line 79 def register(name) registered << name unless registered?(name) end |
.registered ⇒ Object
71 72 73 |
# File 'lib/vagrant-startcloud/plugin.rb', line 71 def registered @registered ||= [] end |
.registered?(name) ⇒ Boolean
75 76 77 |
# File 'lib/vagrant-startcloud/plugin.rb', line 75 def registered?(name) registered.include?(name) end |
.setup_i18n ⇒ Object
Initialize I18n
107 108 109 110 |
# File 'lib/vagrant-startcloud/plugin.rb', line 107 def self.setup_i18n I18n.load_path << File.('../../locales/en.yml', __dir__) I18n.reload! end |
.version ⇒ Object
83 84 85 |
# File 'lib/vagrant-startcloud/plugin.rb', line 83 def version VERSION end |