Class: PBXGroup

Inherits:
PBXObject show all
Defined in:
lib/pbxplorer.rb

Direct Known Subclasses

PBXVariantGroup

Instance Attribute Summary

Attributes inherited from PBXObject

#project_file, #uuid

Instance Method Summary collapse

Methods inherited from PBXObject

filter, #initialize, #inspect, objects_of_class

Methods inherited from Hash

#to_pbx_plist

Constructor Details

This class inherits a constructor from PBXObject

Instance Method Details

#children(recursive = false) ⇒ Object



99
100
101
102
103
104
105
106
107
108
# File 'lib/pbxplorer.rb', line 99

def children recursive=false
  children = self.project_file.objects_with_uuids self["children"]

  if recursive
    subgroups = PBXGroup.objects_of_class children
    subgroups.each { |subgroup| children << subgroup.children(true) }
  end

  children.flatten
end

#file_refs(recursive = false) ⇒ Object



110
111
112
# File 'lib/pbxplorer.rb', line 110

def file_refs recursive=false
  PBXFileReference.objects_of_class self.children(recursive)
end

#helpObject



122
123
124
125
126
# File 'lib/pbxplorer.rb', line 122

def help
  puts "file_ref = group.file_refs.first\n=> " + PBXFileReference.to_s
  puts "group = group.subgroups.first"
  PBXGroup
end

#subgroups(recursive = false) ⇒ Object



114
115
116
# File 'lib/pbxplorer.rb', line 114

def subgroups recursive=false
  PBXGroup.objects_of_class self.children(recursive)
end

#variant_groups(recursive = false) ⇒ Object



118
119
120
# File 'lib/pbxplorer.rb', line 118

def variant_groups recursive=false
  PBXVariantGroup.objects_of_class self.children(recursive)
end