lib/xcake/xcodeproj_ext/PBXGroup.rb in xcake-0.8.13 vs lib/xcake/xcodeproj_ext/PBXGroup.rb in xcake-0.9.0
- old
+ new
@@ -1,15 +1,17 @@
-require 'Xcodeproj'
+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)
+ unless path.kind_of?(Array)
+ path = path.split('/').keep_if do |c|
+ c != '.'
+ end
+ end
child_name = path.shift
child = children.find { |c| c.display_name == child_name }
if child.nil?
@@ -20,22 +22,22 @@
if path.empty?
child
else
child.child_for_path(path)
end
- 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
+ return '.' if parent.kind_of? Xcake::Xcode::Project
+ return '.' if parent.kind_of? PBXProject
+ return parent.dirname.to_s if kind_of? PBXVariantGroup
if display_name
"#{parent.dirname}/#{display_name}"
else
parent.dirname.to_s
end
end
- end
- end
+ end
+ end
end
end