Class: Vagrant::Config::Top
- Inherits:
-
Base
- Object
- Base
- Vagrant::Config::Top
show all
- Defined in:
- lib/vagrant/config.rb
Constant Summary
collapse
- @@configures =
[]
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#[], #instance_variables_hash, #to_json
Constructor Details
#initialize ⇒ Top
Returns a new instance of Top.
157
158
159
160
161
162
163
|
# File 'lib/vagrant/config.rb', line 157
def initialize
self.class.configures_list.each do |key, klass|
instance_variable_set("@#{key}".to_sym, klass.new)
end
@loaded = false
end
|
Class Method Details
145
146
147
148
|
# File 'lib/vagrant/config.rb', line 145
def configures(key, klass)
configures_list << [key, klass]
attr_reader key.to_sym
end
|
141
142
143
|
# File 'lib/vagrant/config.rb', line 141
def configures_list
@@configures ||= []
end
|
Instance Method Details
#loaded! ⇒ Object
169
170
171
|
# File 'lib/vagrant/config.rb', line 169
def loaded!
@loaded = true
end
|
#loaded? ⇒ Boolean
165
166
167
|
# File 'lib/vagrant/config.rb', line 165
def loaded?
@loaded
end
|