Sha256: 1d42e82ea19fcf8b2bfccb385da7c83fe8117b09f04246a2156e9744c7412001
Contents?: true
Size: 942 Bytes
Versions: 9
Compression:
Stored size: 942 Bytes
Contents
require 'Xcodeproj' module Xcodeproj class Project module Object class PBXGroup def child_for_path(path) path = path.split('/').keep_if do |c| c != '.' end unless path.is_a?(Array) child_name = path.shift child = children.find { |c| c.display_name == child_name } if child.nil? child = new_group(child_name) child.path = child_name end if path.empty? child else child.child_for_path(path) end end def dirname return '.' if parent.is_a? Xcake::Xcode::Project return '.' if parent.is_a? PBXProject return parent.dirname.to_s if is_a? PBXVariantGroup if display_name "#{parent.dirname}/#{display_name}" else parent.dirname.to_s end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems