Class: FastlaneCore::TestParser

Inherits:
Object
  • Object
show all
Defined in:
fastlane_core/lib/fastlane_core/test_parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ TestParser

Returns a new instance of TestParser.



16
17
18
19
20
21
22
23
24
25
26
# File 'fastlane_core/lib/fastlane_core/test_parser.rb', line 16

def initialize(path)
  path = File.expand_path(path)
  UI.user_error!("File not found at path '#{path}'") unless File.exist?(path)

  self.file_content = File.read(path)
  self.raw_json = Plist.parse_xml(self.file_content)
  return if self.raw_json["FormatVersion"].to_s.length.zero? # maybe that's a useless plist file

  ensure_file_valid!
  parse_content
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



10
11
12
# File 'fastlane_core/lib/fastlane_core/test_parser.rb', line 10

def data
  @data
end

#file_contentObject

Returns the value of attribute file_content.



12
13
14
# File 'fastlane_core/lib/fastlane_core/test_parser.rb', line 12

def file_content
  @file_content
end

#raw_jsonObject

Returns the value of attribute raw_json.



14
15
16
# File 'fastlane_core/lib/fastlane_core/test_parser.rb', line 14

def raw_json
  @raw_json
end