Class: XCResult::ActionTestSummaryIdentifiableObject

Inherits:
ActionAbstractTestSummary show all
Defined in:
lib/xcresult/models.rb

Overview

  • ActionTestSummaryIdentifiableObject

    • Supertype: ActionAbstractTestSummary

    • Kind: object

    • Properties: + identifier: String?

Instance Attribute Summary collapse

Attributes inherited from ActionAbstractTestSummary

#name

Attributes inherited from AbstractObject

#type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AbstractObject

#fetch_value, #fetch_values

Constructor Details

#initialize(data, parent) ⇒ ActionTestSummaryIdentifiableObject

Returns a new instance of ActionTestSummaryIdentifiableObject.



107
108
109
110
111
# File 'lib/xcresult/models.rb', line 107

def initialize(data, parent)
  self.identifier = fetch_value(data, 'identifier')
  self.parent = parent
  super(data)
end

Instance Attribute Details

#identifierObject

Returns the value of attribute identifier.



105
106
107
# File 'lib/xcresult/models.rb', line 105

def identifier
  @identifier
end

#parentObject

Returns the value of attribute parent.



106
107
108
# File 'lib/xcresult/models.rb', line 106

def parent
  @parent
end

Class Method Details

.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 ActionTestMetadata.new(data, parent)
  else
    raise "Unsupported type: #{type}"
  end
end

Instance Method Details

#all_subtestsObject



113
114
115
# File 'lib/xcresult/models.rb', line 113

def all_subtests
  raise 'Not overridden'
end