Class: ZergXcode::Objects::PBXContainerItemProxy

Inherits:
XcodeObject
  • Object
show all
Defined in:
lib/zerg_xcode/objects/pbx_container_item_proxy.rb

Overview

Proxy for another object.

Unsure these are useful, since each object has an unique ID. They are probably implementation artifacts.

Instance Attribute Summary

Attributes inherited from XcodeObject

#archive_id, #version

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from XcodeObject

#[], #[]=, #_attr_hash, #attrs, #copy_metadata, from, #initialize, #isa, new, #shallow_copy, #visit, #visit_array, #visit_hash, #visit_once, #visit_value, #xref_key

Constructor Details

This class inherits a constructor from ZergXcode::XcodeObject

Class Method Details

.for(object, container) ⇒ Object

Creates a proxy for an object in the same graph, using the given container.

Usually, the container is the project.


14
15
16
17
# File 'lib/zerg_xcode/objects/pbx_container_item_proxy.rb', line 14

def self.for(object, container)
  self.new 'proxyType' => '1', 'containerPortal' => container,
           'remoteInfo' => object.xref_name, 'remoteGlobalIDString' => object
end

Instance Method Details

#targetObject

The proxied object.


7
8
9
# File 'lib/zerg_xcode/objects/pbx_container_item_proxy.rb', line 7

def target
  self['remoteGlobalIDString']
end

#xref_nameObject

:nodoc: override xref_name because Xcode gives us a name in remoteInfo


20
21
22
# File 'lib/zerg_xcode/objects/pbx_container_item_proxy.rb', line 20

def xref_name
  self['remoteInfo']
end