Class: Xcodeproj::Project::Object::PBXGroup

Inherits:
Object
  • Object
show all
Defined in:
lib/synx/pbx_group.rb

Instance Method Summary collapse

Instance Method Details

#all_groupsObject



60
61
62
# File 'lib/synx/pbx_group.rb', line 60

def all_groups
  groups | version_groups | variant_groups
end

#excluded_from_sync?Boolean



26
27
28
# File 'lib/synx/pbx_group.rb', line 26

def excluded_from_sync?
  project.group_exclusions.include?(hierarchy_path)
end

#move_entries_not_in_xcodeprojObject



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/synx/pbx_group.rb', line 30

def move_entries_not_in_xcodeproj
  if excluded_from_sync?
    Synx::Tabber.puts "#{basename}/ (excluded)".yellow
  else
    Synx::Tabber.puts "#{basename}/".green
    Synx::Tabber.increase
    Dir[real_path.to_s + "/*"].each do |entry|
      entry_pathname = real_path + entry
      unless has_entry?(entry_pathname)
        handle_unused_entry(entry_pathname)
      end
    end
    all_groups.each(&:move_entries_not_in_xcodeproj)
    Synx::Tabber.decrease
  end
end

#sync(group) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/synx/pbx_group.rb', line 8

def sync(group)
  ensure_internal_consistency(group)
  if excluded_from_sync?
    Synx::Tabber.puts "#{basename}/ (excluded)".yellow
  else
    Synx::Tabber.puts "#{basename}/".green
    Synx::Tabber.increase

    squash_duplicate_file_references
    work_pathname.mkpath
    files.each { |pbx_file| pbx_file.sync(self) }
    all_groups.each { |group| group.sync(self) }
    sync_path

    Synx::Tabber.decrease
  end
end