class XcodeMove::GroupMembership
Attributes
group[R]
project[R]
Public Class Methods
new(group)
click to toggle source
# File lib/xcmv/group_membership.rb, line 13 def initialize(group) @group = group @project = group.project @siblings = @group.children.to_set end
Public Instance Methods
inferred_targets()
click to toggle source
Returns an array of targets that the `group` should reasonably belong to – either based on `sibling_targets` or the `sibling_targets` of some ancestor group.
# File lib/xcmv/group_membership.rb, line 22 def inferred_targets target_group = self.group targets = [] while targets.empty? and target_group.respond_to?(:sibling_targets) do targets += target_group.sibling_targets target_group = target_group.parent end targets end
max_header_visibility(target)
click to toggle source
# File lib/xcmv/group_membership.rb, line 32 def max_header_visibility(target) sibling_headers = target.headers_build_phase.files.filter{ |f| @siblings.include?(file_ref) } sibling_headers.map{ |f| HeaderVisibility.from_file_settings(f.settings) }.max end