Class: Xcodeproj::Workspace::Reference
- Inherits:
-
Object
- Object
- Xcodeproj::Workspace::Reference
- Defined in:
- lib/xcodeproj/workspace/reference.rb
Overview
Describes a file/group reference of a Workspace.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#type ⇒ String
readonly
This can be of the following values: - absolute - group - container - developer (unsupported).
Class Method Summary collapse
-
.prepend_parent_path(xml_node, path) ⇒ String
Returns the relative path to the parent group reference (if one exists) prepended to the passed in path.
Instance Attribute Details
#type ⇒ String (readonly)
This can be of the following values:
-
absolute
-
group
-
container
-
developer (unsupported)
14 15 16 |
# File 'lib/xcodeproj/workspace/reference.rb', line 14 def type @type end |
Class Method Details
.prepend_parent_path(xml_node, path) ⇒ String
Returns the relative path to the parent group reference (if one exists) prepended to the passed in path.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/xcodeproj/workspace/reference.rb', line 27 def self.prepend_parent_path(xml_node, path) if !xml_node.parent.nil? && (xml_node.parent.name == 'Group') group = GroupReference.from_node(xml_node.parent) if !group.location.nil? && !group.location.empty? path = '' if path.nil? path = File.join(group.location, path) end end path end |