require 'plist' class RewritePlistFile def self.with_prefix(prefix, original) v = Plist::parse_xml(original) files = v['files'] v['files'] = files.map{|i|File.join(prefix, i)} v.to_plist() end end