Method: Xcodeproj::XCScheme::ExecutionAction#initialize

Defined in:
lib/xcodeproj/scheme/execution_action.rb

#initialize(node = nil, action_type = nil) ⇒ ExecutionAction

Returns a new instance of ExecutionAction.

Parameters:

  • node (REXML::Element) (defaults to: nil)

    The ‘ExecutionAction’ XML node that this object will wrap. If nil, will create an empty one

  • action_type (Symbol) (defaults to: nil)

    One of ‘EXECUTION_ACTION_TYPE.keys`



13
14
15
16
17
18
19
# File 'lib/xcodeproj/scheme/execution_action.rb', line 13

def initialize(node = nil, action_type = nil)
  create_xml_element_with_fallback(node, 'ExecutionAction') do
    type = action_type || node.action_type
    raise "[Xcodeproj] Invalid ActionType `#{type}`" unless Constants::EXECUTION_ACTION_TYPE.keys.include?(type)
    @xml_element.attributes['ActionType'] = Constants::EXECUTION_ACTION_TYPE[type]
  end
end