Class: ExtraEntries
- Inherits:
-
Object
- Object
- ExtraEntries
- Defined in:
- lib/vagrant-vrealize/extra-entries.rb
Overview
This class provides a little DSL for setting extra config entries in the Vagrantfile. It’s used like so:
config.vm.provider :vrealize do |vrealize|
vrealize.add_entries do |extra_entries|
extra_entries.string "provider-MyCustomSetting", "myCustomValue"
end
end
Constant Summary collapse
- LiteralTypes =
%w{ boolean decimal integer string }
Instance Method Summary collapse
-
#initialize ⇒ ExtraEntries
constructor
A new instance of ExtraEntries.
- #of_type(type) ⇒ Object
- #types ⇒ Object
Constructor Details
#initialize ⇒ ExtraEntries
Returns a new instance of ExtraEntries.
20 21 22 |
# File 'lib/vagrant-vrealize/extra-entries.rb', line 20 def initialize @entries = Hash.new(){|h,k| h[k] = {}} end |
Instance Method Details
#of_type(type) ⇒ Object
39 40 41 |
# File 'lib/vagrant-vrealize/extra-entries.rb', line 39 def of_type(type) @entries[type] || [] end |
#types ⇒ Object
43 44 45 |
# File 'lib/vagrant-vrealize/extra-entries.rb', line 43 def types @entries.keys end |