Sha256: d38bc6bdbbef209e31611f4b669ed82e1c253ad2000bcd55b765ed1f8f41d18e
Contents?: true
Size: 799 Bytes
Versions: 13
Compression:
Stored size: 799 Bytes
Contents
# Model the root level Vagrant config object # # @see http://docs.vagrantup.com/v2/vagrantfile/index.html class ConfigBuilder::Model::Root < ConfigBuilder::Model::Base include ConfigBuilder::ModelDelegator def_model_delegator :vagrant def_model_delegator :ssh def_model_delegator :vms def initialize @defaults = {:vms => [], :vagrant => {}} end def to_proc Proc.new do |root_config| eval_models(root_config) end end private def eval_vms(root_config) attr(:vms).each do |hash| v = ConfigBuilder::Model::VM.new_from_hash(hash) v.call(root_config) end end def eval_vagrant(root_config) if attr(:vagrant).has_key? :host root_config.vagrant.host = attr(:vagrant)[:host] end end def eval_ssh(root_config) end end
Version data entries
13 entries across 13 versions & 1 rubygems