Sha256: 37c69b9f3765521a2bb11af5e408a6b12d98b0b44f4ca02ca2e85045e6101b68
Contents?: true
Size: 455 Bytes
Versions: 23
Compression:
Stored size: 455 Bytes
Contents
class ConfigBuilder::Filter::Boxes attr_reader :boxes def set_config(root_config) @root_config = root_config @boxes = (@root_config.delete('boxes') || {}) end def run return @root_config if @root_config['vms'].nil? @root_config['vms'].each { |vm_hash| filter_vm(vm_hash) } @root_config end def filter_vm(vm_hash) if (box_name = vm_hash['box']) vm_hash['box_url'] ||= @boxes[box_name] end end end
Version data entries
23 entries across 23 versions & 2 rubygems