Class: Xcodeproj::XCScheme::ShellScriptActionContent
- Inherits:
-
XMLElementWrapper
- Object
- XMLElementWrapper
- Xcodeproj::XCScheme::ShellScriptActionContent
- Defined in:
- lib/xcodeproj/scheme/shell_script_action_content.rb
Overview
This class wraps a ‘ActionContent’ node of type ‘Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction’ of a .xcscheme XML file
Instance Attribute Summary
Attributes inherited from XMLElementWrapper
Instance Method Summary collapse
-
#buildable_reference ⇒ BuildableReference
The BuildableReference (Xcode target) associated with this ActionContent.
- #buildable_reference=(ref) ⇒ Object
-
#initialize(node = nil) ⇒ ShellScriptActionContent
constructor
A new instance of ShellScriptActionContent.
-
#script_text ⇒ String
The contents of the shell script represented by this ActionContent.
- #script_text=(value) ⇒ Object
-
#shell_to_invoke ⇒ String
The preferred shell to invoke with this ActionContent.
- #shell_to_invoke=(value) ⇒ Object
-
#title ⇒ String
The title of this ActionContent.
- #title=(value) ⇒ Object
Methods inherited from XMLElementWrapper
Constructor Details
#initialize(node = nil) ⇒ ShellScriptActionContent
Returns a new instance of ShellScriptActionContent.
11 12 13 14 15 |
# File 'lib/xcodeproj/scheme/shell_script_action_content.rb', line 11 def initialize(node = nil) create_xml_element_with_fallback(node, 'ActionContent') do self.title = 'Run Script' end end |
Instance Method Details
#buildable_reference ⇒ BuildableReference
Returns The BuildableReference (Xcode target) associated with this ActionContent.
62 63 64 |
# File 'lib/xcodeproj/scheme/shell_script_action_content.rb', line 62 def buildable_reference BuildableReference.new(@xml_element.elements['EnvironmentBuildable'].elements['BuildableReference']) end |
#buildable_reference=(ref) ⇒ Object
69 70 71 72 73 74 |
# File 'lib/xcodeproj/scheme/shell_script_action_content.rb', line 69 def buildable_reference=(ref) @xml_element.delete_element('EnvironmentBuildable') env_buildable = @xml_element.add_element('EnvironmentBuildable') env_buildable.add_element(ref.xml_element) end |
#script_text ⇒ String
Returns The contents of the shell script represented by this ActionContent.
34 35 36 |
# File 'lib/xcodeproj/scheme/shell_script_action_content.rb', line 34 def script_text @xml_element.attributes['scriptText'] end |
#script_text=(value) ⇒ Object
41 42 43 |
# File 'lib/xcodeproj/scheme/shell_script_action_content.rb', line 41 def script_text=(value) @xml_element.attributes['scriptText'] = value end |
#shell_to_invoke ⇒ String
Returns The preferred shell to invoke with this ActionContent.
48 49 50 |
# File 'lib/xcodeproj/scheme/shell_script_action_content.rb', line 48 def shell_to_invoke @xml_element.attributes['shellToInvoke'] end |
#shell_to_invoke=(value) ⇒ Object
55 56 57 |
# File 'lib/xcodeproj/scheme/shell_script_action_content.rb', line 55 def shell_to_invoke=(value) @xml_element.attributes['shellToInvoke'] = value end |
#title ⇒ String
Returns The title of this ActionContent.
20 21 22 |
# File 'lib/xcodeproj/scheme/shell_script_action_content.rb', line 20 def title @xml_element.attributes['title'] end |
#title=(value) ⇒ Object
27 28 29 |
# File 'lib/xcodeproj/scheme/shell_script_action_content.rb', line 27 def title=(value) @xml_element.attributes['title'] = value end |