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



28
29
30
# File 'lib/kintsugi/xcodeproj_extensions.rb', line 28

def display_name
  project_ref.display_name
end

#product_groupObject



32
33
34
# File 'lib/kintsugi/xcodeproj_extensions.rb', line 32

def product_group
  self[:product_group]
end

#project_refObject



36
37
38
# File 'lib/kintsugi/xcodeproj_extensions.rb', line 36

def project_ref
  self[:project_ref]
end

#to_tree_hashObject



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

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