Class: Trainer::XCResult::ActionTestSummaryIdentifiableObject

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

Overview

  • ActionTestSummaryIdentifiableObject

    • Supertype: ActionAbstractTestSummary

    • Kind: object

    • Properties: + identifier: String?

Direct Known Subclasses

ActionTestMetadata, ActionTestSummaryGroup

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.



102
103
104
105
106
# File 'trainer/lib/trainer/xcresult.rb', line 102

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.



100
101
102
# File 'trainer/lib/trainer/xcresult.rb', line 100

def identifier
  @identifier
end

#parentObject

Returns the value of attribute parent.



101
102
103
# File 'trainer/lib/trainer/xcresult.rb', line 101

def parent
  @parent
end

Class Method Details

.create(data, parent) ⇒ Object



112
113
114
115
116
117
118
119
120
121
# File 'trainer/lib/trainer/xcresult.rb', line 112

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

Instance Method Details

#all_subtestsObject



108
109
110
# File 'trainer/lib/trainer/xcresult.rb', line 108

def all_subtests
  raise "Not overridden"
end