Class: Xcodeproj::XCScheme::BuildableProductRunnable

Inherits:
XMLElementWrapper show all
Defined in:
lib/xcodeproj/scheme/buildable_product_runnable.rb

Overview

This class wraps the BuildableProductRunnable node of a .xcscheme XML file

A BuildableProductRunnable is a product that is both buildable (it contains a BuildableReference) and runnable (it can be launched and debugged)

Instance Attribute Summary

Attributes inherited from XMLElementWrapper

#xml_element

Instance Method Summary collapse

Methods inherited from XMLElementWrapper

#to_s

Constructor Details

#initialize(target_or_node = nil, runnable_debugging_mode = nil) ⇒ BuildableProductRunnable



17
18
19
20
21
22
# File 'lib/xcodeproj/scheme/buildable_product_runnable.rb', line 17

def initialize(target_or_node = nil, runnable_debugging_mode = nil)
  create_xml_element_with_fallback(target_or_node, 'BuildableProductRunnable') do
    self.buildable_reference = BuildableReference.new(target_or_node) if target_or_node
    @xml_element.attributes['runnableDebuggingMode'] = runnable_debugging_mode.to_s if runnable_debugging_mode
  end
end

Instance Method Details

#buildable_referenceBuildableReference



41
42
43
# File 'lib/xcodeproj/scheme/buildable_product_runnable.rb', line 41

def buildable_reference
  @buildable_reference ||= BuildableReference.new @xml_element.elements['BuildableReference']
end

#buildable_reference=(ref) ⇒ Object



48
49
50
51
52
# File 'lib/xcodeproj/scheme/buildable_product_runnable.rb', line 48

def buildable_reference=(ref)
  @xml_element.delete_element('BuildableReference')
  @xml_element.add_element(ref.xml_element)
  @buildable_reference = ref
end

#runnable_debugging_modeString



27
28
29
# File 'lib/xcodeproj/scheme/buildable_product_runnable.rb', line 27

def runnable_debugging_mode
  @xml_element.attributes['runnableDebuggingMode']
end

#runnable_debugging_mode=(value) ⇒ Object



34
35
36
# File 'lib/xcodeproj/scheme/buildable_product_runnable.rb', line 34

def runnable_debugging_mode=(value)
  @xml_element.attributes['runnableDebuggingMode'] = value.to_s
end