Class: Xcode::Scheme
- Inherits:
-
Object
- Object
- Xcode::Scheme
- Defined in:
- lib/xcode/scheme.rb
Overview
Schemes are an XML file that describe build, test, launch and profile actions For the purposes of Xcoder, we want to be able to build and test The scheme’s build action only describes a target, so we need to look at launch for the config
Instance Attribute Summary collapse
-
#launch ⇒ Object
readonly
Returns the value of attribute launch.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#project ⇒ Object
readonly
Returns the value of attribute project.
-
#test ⇒ Object
readonly
Returns the value of attribute test.
Instance Method Summary collapse
- #builder ⇒ Object
-
#initialize(project, path) ⇒ Scheme
constructor
A new instance of Scheme.
Constructor Details
#initialize(project, path) ⇒ Scheme
Returns a new instance of Scheme.
10 11 12 13 14 15 16 17 18 |
# File 'lib/xcode/scheme.rb', line 10 def initialize(project, path) @project = project @path = File.(path) @name = File.basename(path).gsub(/\.xcscheme$/,'') doc = Nokogiri::XML(open(@path)) @launch = parse_action(doc, 'launch') @test = parse_action(doc, 'test') end |
Instance Attribute Details
#launch ⇒ Object (readonly)
Returns the value of attribute launch.
9 10 11 |
# File 'lib/xcode/scheme.rb', line 9 def launch @launch end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
9 10 11 |
# File 'lib/xcode/scheme.rb', line 9 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
9 10 11 |
# File 'lib/xcode/scheme.rb', line 9 def path @path end |
#project ⇒ Object (readonly)
Returns the value of attribute project.
9 10 11 |
# File 'lib/xcode/scheme.rb', line 9 def project @project end |
#test ⇒ Object (readonly)
Returns the value of attribute test.
9 10 11 |
# File 'lib/xcode/scheme.rb', line 9 def test @test end |