class HMap::Target::FrameworkVFS
Attributes
entrys[R]
Public Class Methods
new(entrys = [])
click to toggle source
# File lib/cocoapods-hmap/framework/framework_vfs.rb, line 56 def initialize(entrys = []) @entrys = entrys end
Public Instance Methods
vfs_path()
click to toggle source
# File lib/cocoapods-hmap/framework/framework_vfs.rb, line 60 def vfs_path return {} if entrys.empty? entrys.each_with_object({}) do |entry, paths| c = "#{entry.configuration}-#{entry.platform}" paths[c] ||= [] paths[c] << entry end end
vfs_path_by_platform_and_configuration(platform, config)
click to toggle source
# File lib/cocoapods-hmap/framework/framework_vfs.rb, line 70 def vfs_path_by_platform_and_configuration(platform, config) return vfs_path if platform.nil? && config.nil? key = platform if config.nil? key = config if platform.nil? vfs_path.select { |k, _| k.include?(key) } end
write(path = nil)
click to toggle source
# File lib/cocoapods-hmap/framework/framework_vfs.rb, line 78 def write(path = nil) vfs_path.each do |key, values| es = values.map do |value| headers_real_paths = value.headers_real_paths modules_real_paths = value.modules_real_paths VFS::FileCollectorEntry.new(Pathname(value.app_build_dir), modules_real_paths, headers_real_paths) end fc = VFS::FileCollector.new(es) pa = Helper::Pods.vfs_files_dir.join(key) pa = File.join(path, key) unless path.nil? pa = Pathname(pa) pa.mkpath unless pa.exist? fc.write_mapping(pa) end end