Class: XCResult::AbstractObject
- Inherits:
-
Object
- Object
- XCResult::AbstractObject
- Defined in:
- lib/xcresult/models.rb
Overview
Model attributes and relationships taken from running the following command: xcrun xcresulttool formatDescription
Direct Known Subclasses
ActionAbstractTestSummary, ActionRecord, ActionResult, ActionTestActivitySummary, ActionTestAttachment, ActionTestPlanRunSummaries, ActionsInvocationRecord, CodeCoverageInfo, DocumentLocation, IssueSummary, Reference, ResultIssueSummaries, SortedKeyValueArray, SortedKeyValueArrayPair, 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.
11 12 13 |
# File 'lib/xcresult/models.rb', line 11 def initialize(data) self.type = data['_type']['_name'] end |
Instance Attribute Details
#type ⇒ Object
Returns the value of attribute type.
10 11 12 |
# File 'lib/xcresult/models.rb', line 10 def type @type end |
Instance Method Details
#fetch_value(data, key) ⇒ Object
15 16 17 |
# File 'lib/xcresult/models.rb', line 15 def fetch_value(data, key) (data[key] || {})['_value'] end |
#fetch_values(data, key) ⇒ Object
19 20 21 22 23 |
# File 'lib/xcresult/models.rb', line 19 def fetch_values(data, key) return [] if data.nil? (data[key] || {})['_values'] || [] end |