Module: Xcmake::XcodeprojHelper
- Included in:
- Generator
- Defined in:
- lib/xcmake/helpers/xcodeproj_helper.rb
Instance Method Summary collapse
- #find_group_with_path(path) ⇒ Object
- #find_target_with_path(path) ⇒ Object
- #group_paths ⇒ Object
- #is_target_path?(path) ⇒ Boolean
- #project_root ⇒ Object
Instance Method Details
#find_group_with_path(path) ⇒ Object
15 16 17 |
# File 'lib/xcmake/helpers/xcodeproj_helper.rb', line 15 def find_group_with_path(path) @project.main_group.find_subpath(path) end |
#find_target_with_path(path) ⇒ Object
19 20 21 22 |
# File 'lib/xcmake/helpers/xcodeproj_helper.rb', line 19 def find_target_with_path(path) target_name = path.split("/").first @project.targets.find { |t| t.name == target_name } end |
#group_paths ⇒ Object
7 8 9 |
# File 'lib/xcmake/helpers/xcodeproj_helper.rb', line 7 def group_paths @project.main_group.recursive_children_groups.map(&:real_path).uniq end |
#is_target_path?(path) ⇒ Boolean
11 12 13 |
# File 'lib/xcmake/helpers/xcodeproj_helper.rb', line 11 def is_target_path?(path) @project.targets.map(&:name).include?(path) end |
#project_root ⇒ Object
3 4 5 |
# File 'lib/xcmake/helpers/xcodeproj_helper.rb', line 3 def project_root @project.path.dirname.to_s end |