Class: FastlaneCore::XcodebuildListOutputParser
- Inherits:
-
Object
- Object
- FastlaneCore::XcodebuildListOutputParser
- Defined in:
- lib/fastlane_core/xcodebuild_list_output_parser.rb
Instance Attribute Summary collapse
-
#configurations ⇒ Object
readonly
Returns the value of attribute configurations.
-
#schemes ⇒ Object
readonly
Returns the value of attribute schemes.
-
#targets ⇒ Object
readonly
Returns the value of attribute targets.
Instance Method Summary collapse
-
#initialize(output) ⇒ XcodebuildListOutputParser
constructor
A new instance of XcodebuildListOutputParser.
Constructor Details
#initialize(output) ⇒ XcodebuildListOutputParser
Returns a new instance of XcodebuildListOutputParser.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/fastlane_core/xcodebuild_list_output_parser.rb', line 7 def initialize(output) @configurations = [] @schemes = [] @targets = [] current = nil output.split("\n").each do |line| line = line.strip if line.empty? current = nil elsif line == "Targets:" current = @targets elsif line == "Schemes:" current = @schemes elsif line == "Build Configurations:" current = @configurations elsif !current.nil? current << line end end end |
Instance Attribute Details
#configurations ⇒ Object (readonly)
Returns the value of attribute configurations.
3 4 5 |
# File 'lib/fastlane_core/xcodebuild_list_output_parser.rb', line 3 def configurations @configurations end |
#schemes ⇒ Object (readonly)
Returns the value of attribute schemes.
4 5 6 |
# File 'lib/fastlane_core/xcodebuild_list_output_parser.rb', line 4 def schemes @schemes end |
#targets ⇒ Object (readonly)
Returns the value of attribute targets.
5 6 7 |
# File 'lib/fastlane_core/xcodebuild_list_output_parser.rb', line 5 def targets @targets end |