Class: Xcodeproj::Project::ObjectDictionary

Inherits:
Object
  • Object
show all
Defined in:
lib/kintsugi/xcodeproj_extensions.rb

Overview

Extends ‘ObjectDictionary` to act like an `Object` if `self` repreresents a project reference.

Constant Summary collapse

@@old_to_tree_hash =
instance_method(:to_tree_hash)

Instance Method Summary collapse

Instance Method Details

#display_nameObject



18
19
20
# File 'lib/kintsugi/xcodeproj_extensions.rb', line 18

def display_name
  project_ref.display_name
end

#product_groupObject



22
23
24
# File 'lib/kintsugi/xcodeproj_extensions.rb', line 22

def product_group
  self[:product_group]
end

#project_refObject



26
27
28
# File 'lib/kintsugi/xcodeproj_extensions.rb', line 26

def project_ref
  self[:project_ref]
end

#to_tree_hashObject



13
14
15
16
# File 'lib/kintsugi/xcodeproj_extensions.rb', line 13

def to_tree_hash
  result = @@old_to_tree_hash.bind(self).call
  self[:project_ref] ? result.merge("displayName" => display_name) : result
end