class Xcodeproj::XCScheme::AbstractSchemeAction
This abstract class aims to be the base class for every XxxAction class that have a build_configuration
attribute
Public Instance Methods
add_post_action(post_action)
click to toggle source
@param [ExecutionAction] post_action
Add an action to the list of actions to run after this scheme action. It can be either a 'Run Script' or a 'Send Email' action.
# File lib/xcodeproj/scheme/abstract_scheme_action.rb, line 94 def add_post_action(post_action) post_actions = @xml_element.elements['PostActions'] || @xml_element.add_element('PostActions') post_actions.add_element(post_action.xml_element) end
add_pre_action(pre_action)
click to toggle source
@param [ExecutionAction] pre_action
Add an action to the list of actions to run before this scheme action. It can be either a 'Run Script' or a 'Send Email' action.
# File lib/xcodeproj/scheme/abstract_scheme_action.rb, line 58 def add_pre_action(pre_action) pre_actions = @xml_element.elements['PreActions'] || @xml_element.add_element('PreActions') pre_actions.add_element(pre_action.xml_element) end
build_configuration()
click to toggle source
@return [String]
The build configuration associated with this action (usually either 'Debug' or 'Release')
# File lib/xcodeproj/scheme/abstract_scheme_action.rb, line 15 def build_configuration @xml_element.attributes['buildConfiguration'] end
build_configuration=(config_name)
click to toggle source
@param [String] config_name
The build configuration to associate with this action (usually either 'Debug' or 'Release')
# File lib/xcodeproj/scheme/abstract_scheme_action.rb, line 23 def build_configuration=(config_name) @xml_element.attributes['buildConfiguration'] = config_name end
post_actions()
click to toggle source
@return [Array<ExecutionAction>]
The list of actions to run after this scheme action. Each entry can be either a 'Run Script' or a 'Send Email' action.
# File lib/xcodeproj/scheme/abstract_scheme_action.rb, line 67 def post_actions post_actions = @xml_element.elements['PostActions'] return nil unless post_actions post_actions.get_elements('ExecutionAction').map do |entry_node| ExecutionAction.new(entry_node) end end
post_actions=(post_actions)
click to toggle source
@param [Array<ExecutionAction>] post_actions
Set the list of actions to run after this scheme action. Each entry can be either a 'Run Script' or a 'Send Email' action.
# File lib/xcodeproj/scheme/abstract_scheme_action.rb, line 79 def post_actions=(post_actions) @xml_element.delete_element('PostActions') unless post_actions.empty? post_actions_element = @xml_element.add_element('PostActions') post_actions.each do |entry_node| post_actions_element.add_element(entry_node.xml_element) end end post_actions end
pre_actions()
click to toggle source
@return [Array<ExecutionAction>]
The list of actions to run before this scheme action. Each entry can be either a 'Run Script' or a 'Send Email' action.
# File lib/xcodeproj/scheme/abstract_scheme_action.rb, line 31 def pre_actions pre_actions = @xml_element.elements['PreActions'] return nil unless pre_actions pre_actions.get_elements('ExecutionAction').map do |entry_node| ExecutionAction.new(entry_node) end end
pre_actions=(pre_actions)
click to toggle source
@param [Array<ExecutionAction>] pre_actions
Set the list of actions to run before this scheme action. Each entry can be either a 'Run Script' or a 'Send Email' action.
# File lib/xcodeproj/scheme/abstract_scheme_action.rb, line 43 def pre_actions=(pre_actions) @xml_element.delete_element('PreActions') unless pre_actions.empty? pre_actions_element = @xml_element.add_element('PreActions') pre_actions.each do |entry_node| pre_actions_element.add_element(entry_node.xml_element) end end pre_actions end