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.



24
25
26
27
# File 'lib/zerg_xcode/objects/pbx_container_item_proxy.rb', line 24

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.



17
18
19
# File 'lib/zerg_xcode/objects/pbx_container_item_proxy.rb', line 17

def target
  self['remoteGlobalIDString']
end

#xref_nameObject

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



30
31
32
# File 'lib/zerg_xcode/objects/pbx_container_item_proxy.rb', line 30

def xref_name
  self['remoteInfo']
end