Class: Xcodeproj::XCScheme::AbstractSchemeAction
Overview
This abstract class aims to be the base class for every XxxAction class that have a #build_configuration attribute
Instance Attribute Summary
#xml_element
Instance Method Summary
collapse
#to_s
Instance Method Details
#add_post_action(post_action) ⇒ Object
94
95
96
97
|
# 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) ⇒ Object
58
59
60
61
|
# 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 ⇒ String
15
16
17
|
# File 'lib/xcodeproj/scheme/abstract_scheme_action.rb', line 15
def build_configuration
@xml_element.attributes['buildConfiguration']
end
|
#build_configuration=(config_name) ⇒ Object
23
24
25
|
# File 'lib/xcodeproj/scheme/abstract_scheme_action.rb', line 23
def build_configuration=(config_name)
@xml_element.attributes['buildConfiguration'] = config_name
end
|
67
68
69
70
71
72
73
|
# 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) ⇒ Object
79
80
81
82
83
84
85
86
87
88
|
# 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
|
31
32
33
34
35
36
37
|
# 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) ⇒ Object
43
44
45
46
47
48
49
50
51
52
|
# 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
|