Class: Xcodeproj::XCScheme::MacroExpansion
- Inherits:
-
XMLElementWrapper
- Object
- XMLElementWrapper
- Xcodeproj::XCScheme::MacroExpansion
- Defined in:
- lib/xcodeproj/scheme/macro_expansion.rb
Overview
This class wraps the MacroExpansion node of a .xcscheme XML file
Instance Attribute Summary
Attributes inherited from XMLElementWrapper
Instance Method Summary collapse
-
#buildable_reference ⇒ BuildableReference
The BuildableReference this MacroExpansion refers to.
- #buildable_reference=(ref) ⇒ Object
-
#initialize(target_or_node = nil) ⇒ MacroExpansion
constructor
A new instance of MacroExpansion.
Methods inherited from XMLElementWrapper
Constructor Details
#initialize(target_or_node = nil) ⇒ MacroExpansion
Returns a new instance of MacroExpansion.
11 12 13 14 15 |
# File 'lib/xcodeproj/scheme/macro_expansion.rb', line 11 def initialize(target_or_node = nil) create_xml_element_with_fallback(target_or_node, 'MacroExpansion') do self.buildable_reference = BuildableReference.new(target_or_node) if target_or_node end end |
Instance Method Details
#buildable_reference ⇒ BuildableReference
Returns The BuildableReference this MacroExpansion refers to.
20 21 22 |
# File 'lib/xcodeproj/scheme/macro_expansion.rb', line 20 def buildable_reference @buildable_reference ||= BuildableReference.new @xml_element.elements['BuildableReference'] end |
#buildable_reference=(ref) ⇒ Object
27 28 29 30 31 |
# File 'lib/xcodeproj/scheme/macro_expansion.rb', line 27 def buildable_reference=(ref) @xml_element.delete_element('BuildableReference') @xml_element.add_element(ref.xml_element) @buildable_reference = ref end |