Method: XCResult::ActionTestSummaryIdentifiableObject.create

Defined in:
lib/xcresult/models.rb

.create(data, parent) ⇒ Object



117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/xcresult/models.rb', line 117

def self.create(data, parent)
  type = data['_type']['_name']
  if type == 'ActionTestSummaryGroup'
    return ActionTestSummaryGroup.new(data, parent)
  elsif type == 'ActionTestSummary'
    return ActionTestSummary.new(data, parent)
  elsif type == 'ActionTestMetadata'
    return .new(data, parent)
  else
    raise "Unsupported type: #{type}"
  end
end