Class: VagrantPlugins::Configuration::Config
- Inherits:
-
Object
- Object
- VagrantPlugins::Configuration::Config
- Defined in:
- lib/vagrant-configuration/config.rb
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #method_missing(method_id) ⇒ Object
Constructor Details
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_id) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/vagrant-configuration/config.rb', line 13 def method_missing(method_id) env = ENV[method_id.to_s.upcase] return env if env begin res = @conf.send(method_id) if @conf rescue puts "#{method_id} not found in #{ENV['HOME']}/.vagrant.rb" end return res if res raise Exception.new("no configuration entry or environment variable was found for #{method_id}") end |