Class: Xcodeproj::XCScheme::ProfileAction
- Inherits:
-
AbstractSchemeAction
- Object
- XMLElementWrapper
- AbstractSchemeAction
- Xcodeproj::XCScheme::ProfileAction
- Defined in:
- lib/xcodeproj/scheme/profile_action.rb
Overview
This class wraps the ProfileAction node of a .xcscheme XML file
Instance Attribute Summary
Attributes inherited from XMLElementWrapper
Instance Method Summary collapse
-
#buildable_product_runnable ⇒ BuildableProductRunnable
The BuildableProductRunnable to launch when launching the Profile action.
- #buildable_product_runnable=(runnable) ⇒ Object
-
#initialize(node = nil) ⇒ ProfileAction
constructor
A new instance of ProfileAction.
- #should_use_launch_scheme_args_env=(flag) ⇒ Object
-
#should_use_launch_scheme_args_env? ⇒ Bool
Whether this Profile Action should use the same arguments and environment variables as the Launch Action.
Methods inherited from AbstractSchemeAction
#add_post_action, #add_pre_action, #build_configuration, #build_configuration=, #post_actions, #post_actions=, #pre_actions, #pre_actions=
Methods inherited from XMLElementWrapper
Constructor Details
#initialize(node = nil) ⇒ ProfileAction
Returns a new instance of ProfileAction.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/xcodeproj/scheme/profile_action.rb', line 12 def initialize(node = nil) create_xml_element_with_fallback(node, 'ProfileAction') do # Setup default values for other (handled) attributes self.build_configuration = 'Release' self.should_use_launch_scheme_args_env = true # Add some attributes (that are not handled by this wrapper class yet but expected in the XML) @xml_element.attributes['savedToolIdentifier'] = '' @xml_element.attributes['useCustomWorkingDirectory'] = bool_to_string(false) @xml_element.attributes['debugDocumentVersioning'] = bool_to_string(true) end end |
Instance Method Details
#buildable_product_runnable ⇒ BuildableProductRunnable
Returns The BuildableProductRunnable to launch when launching the Profile action.
44 45 46 |
# File 'lib/xcodeproj/scheme/profile_action.rb', line 44 def buildable_product_runnable BuildableProductRunnable.new @xml_element.elements['BuildableProductRunnable'], 0 end |
#buildable_product_runnable=(runnable) ⇒ Object
51 52 53 54 |
# File 'lib/xcodeproj/scheme/profile_action.rb', line 51 def buildable_product_runnable=(runnable) @xml_element.delete_element('BuildableProductRunnable') @xml_element.add_element(runnable.xml_element) if runnable end |
#should_use_launch_scheme_args_env=(flag) ⇒ Object
37 38 39 |
# File 'lib/xcodeproj/scheme/profile_action.rb', line 37 def should_use_launch_scheme_args_env=(flag) @xml_element.attributes['shouldUseLaunchSchemeArgsEnv'] = bool_to_string(flag) end |
#should_use_launch_scheme_args_env? ⇒ Bool
Returns Whether this Profile Action should use the same arguments and environment variables as the Launch Action.
29 30 31 |
# File 'lib/xcodeproj/scheme/profile_action.rb', line 29 def should_use_launch_scheme_args_env? string_to_bool(@xml_element.attributes['shouldUseLaunchSchemeArgsEnv']) end |