class Vagrant::Vagrantfile::ConfigWrapper
Public Class Methods
new(client:)
click to toggle source
# File lib/vagrant/vagrantfile/remote.rb, line 34 def initialize(client:) @client = client @logger = Log4r::Logger.new(self.class.name.downcase) @root = Vagrant::Config::V2::Root.new(Vagrant.plugin("2").local_manager.config) end
Public Instance Methods
method_missing(*args, **opts, &block)
click to toggle source
# File lib/vagrant/vagrantfile/remote.rb, line 40 def method_missing(*args, **opts, &block) case args.size when 1 namespace = args.first ConfigFetcher.new(namespace, client: @client) when 2 if args.first.to_s != "[]" raise ArgumentError, "Expected #[] but received ##{args.first} on config wrapper" end namespace = args.last ConfigFetcher.new(namespace, client: @client) else @logger.trace("cannot handle wrapped config request for #{args.inspect}, sending to root") @root.send(*args, **opts, &block) end end