Class: Trainer::XCResult::AbstractObject
- Inherits:
-
Object
- Object
- Trainer::XCResult::AbstractObject
- Defined in:
- trainer/lib/trainer/xcresult.rb
Overview
Model attributes and relationships taken from running the following command: xcrun xcresulttool formatDescription
Direct Known Subclasses
ActionAbstractTestSummary, ActionRecord, ActionResult, ActionTestPlanRunSummaries, ActionsInvocationRecord, DocumentLocation, IssueSummary, Reference, ResultIssueSummaries, TypeDefinition
Instance Attribute Summary collapse
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
- #fetch_value(data, key) ⇒ Object
- #fetch_values(data, key) ⇒ Object
-
#initialize(data) ⇒ AbstractObject
constructor
A new instance of AbstractObject.
Constructor Details
#initialize(data) ⇒ AbstractObject
Returns a new instance of AbstractObject.
8 9 10 |
# File 'trainer/lib/trainer/xcresult.rb', line 8 def initialize(data) self.type = data["_type"]["_name"] end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
7 8 9 |
# File 'trainer/lib/trainer/xcresult.rb', line 7 def type @type end |
Instance Method Details
#fetch_value(data, key) ⇒ Object
12 13 14 |
# File 'trainer/lib/trainer/xcresult.rb', line 12 def fetch_value(data, key) return (data[key] || {})["_value"] end |
#fetch_values(data, key) ⇒ Object
16 17 18 |
# File 'trainer/lib/trainer/xcresult.rb', line 16 def fetch_values(data, key) return (data[key] || {})["_values"] || [] end |