Class: XCResult::ActionTestSummaryGroup

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

Overview

  • ActionTestSummaryGroup

    • Supertype: ActionTestSummaryIdentifiableObject

    • Kind: object

    • Properties: + duration: Double + subtests: [ActionTestSummaryIdentifiableObject]

Instance Attribute Summary collapse

Attributes inherited from ActionTestSummaryIdentifiableObject

#identifier, #parent

Attributes inherited from ActionAbstractTestSummary

#name

Attributes inherited from AbstractObject

#type

Instance Method Summary collapse

Methods inherited from ActionTestSummaryIdentifiableObject

create

Methods inherited from AbstractObject

#fetch_value, #fetch_values

Constructor Details

#initialize(data, parent) ⇒ ActionTestSummaryGroup

Returns a new instance of ActionTestSummaryGroup.



137
138
139
140
141
142
143
# File 'lib/xcresult/models.rb', line 137

def initialize(data, parent)
  self.duration = fetch_value(data, 'duration').to_f
  self.subtests = fetch_values(data, 'subtests').map do |subtests_data|
    ActionTestSummaryIdentifiableObject.create(subtests_data, self)
  end
  super(data, parent)
end

Instance Attribute Details

#durationObject

Returns the value of attribute duration.



135
136
137
# File 'lib/xcresult/models.rb', line 135

def duration
  @duration
end

#subtestsObject

Returns the value of attribute subtests.



136
137
138
# File 'lib/xcresult/models.rb', line 136

def subtests
  @subtests
end

Instance Method Details

#all_subtestsObject



145
146
147
# File 'lib/xcresult/models.rb', line 145

def all_subtests
  subtests.map(&:all_subtests).flatten
end