# File lib/puppet/network/handler/fileserver.rb, line 443 443: def expand(path, client = nil) 444: # This map should probably be moved into a method. 445: map = nil 446: 447: if client 448: map = clientmap(client) 449: else 450: Puppet.notice "No client; expanding '%s' with local host" % 451: path 452: # Else, use the local information 453: map = localmap() 454: end 455: path.gsub(/%(.)/) do |v| 456: key = $1 457: if key == "%" 458: "%" 459: else 460: map[key] || v 461: end 462: end 463: end