class Xcodeproj::XCScheme::ShellScriptActionContent

This class wraps a ‘ActionContent’ node of type ‘Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction’ of a .xcscheme XML file

Public Class Methods

new(node = nil) click to toggle source

@param [REXML::Element] node

The 'ActionContent' XML node that this object will wrap.
If nil, will create a default XML node to use.
# 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

Public Instance Methods

buildable_reference() click to toggle source

@return [BuildableReference]

The BuildableReference (Xcode target) associated with this ActionContent
# 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) click to toggle source

@param [BuildableReference] ref

Set the BuildableReference (Xcode target) associated with this ActionContent
# 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() click to toggle source

@return [String]

The contents of the shell script represented by this ActionContent
# File lib/xcodeproj/scheme/shell_script_action_content.rb, line 34
def script_text
  @xml_element.attributes['scriptText']
end
script_text=(value) click to toggle source

@param [String] value

Set the contents of the shell script represented by this ActionContent
# File lib/xcodeproj/scheme/shell_script_action_content.rb, line 41
def script_text=(value)
  @xml_element.attributes['scriptText'] = value
end
shell_to_invoke() click to toggle source

@return [String]

The preferred shell to invoke with this ActionContent
# File lib/xcodeproj/scheme/shell_script_action_content.rb, line 48
def shell_to_invoke
  @xml_element.attributes['shellToInvoke']
end
shell_to_invoke=(value) click to toggle source

@param [String] value

Set the preferred shell to invoke with this ActionContent
# File lib/xcodeproj/scheme/shell_script_action_content.rb, line 55
def shell_to_invoke=(value)
  @xml_element.attributes['shellToInvoke'] = value
end
title() click to toggle source

@return [String]

The title of this ActionContent
# File lib/xcodeproj/scheme/shell_script_action_content.rb, line 20
def title
  @xml_element.attributes['title']
end
title=(value) click to toggle source

@param [String] value

Set the title of this ActionContent
# File lib/xcodeproj/scheme/shell_script_action_content.rb, line 27
def title=(value)
  @xml_element.attributes['title'] = value
end