Class: XCResult::ActionTestActivitySummary

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

Overview

  • ActionTestActivitySummary

    • Kind: object

    • Properties: + title: String + activityType: String + uuid: String + start: Date? + finish: Date? + attachments: [ActionTestAttachment] + subactivities: [ActionTestActivitySummary]

Instance Attribute Summary collapse

Attributes inherited from AbstractObject

#type

Instance Method Summary collapse

Methods inherited from AbstractObject

#fetch_value, #fetch_values

Constructor Details

#initialize(data) ⇒ ActionTestActivitySummary

Returns a new instance of ActionTestActivitySummary.



470
471
472
473
474
475
476
477
478
479
480
481
482
483
# File 'lib/xcresult/models.rb', line 470

def initialize(data)
  self.title = fetch_value(data, 'title')
  self.activity_type = fetch_value(data, 'activityType')
  self.uuid = fetch_value(data, 'uuid')
  self.start = Time.parse(fetch_value(data, 'start')) if data['start']
  self.finish = Time.parse(fetch_value(data, 'finish')) if data['finish']
  self.attachments = fetch_values(data, 'attachments').map do |attachment_data|
    ActionTestAttachment.new(attachment_data)
  end
  self.subactivities = fetch_values(data, 'subactivities').map do |summary_data|
    ActionTestActivitySummary.new(summary_data)
  end
  super(data)
end

Instance Attribute Details

#activity_typeObject

Returns the value of attribute activity_type.



464
465
466
# File 'lib/xcresult/models.rb', line 464

def activity_type
  @activity_type
end

#attachmentsObject

Returns the value of attribute attachments.



468
469
470
# File 'lib/xcresult/models.rb', line 468

def attachments
  @attachments
end

#finishObject

Returns the value of attribute finish.



467
468
469
# File 'lib/xcresult/models.rb', line 467

def finish
  @finish
end

#startObject

Returns the value of attribute start.



466
467
468
# File 'lib/xcresult/models.rb', line 466

def start
  @start
end

#subactivitiesObject

Returns the value of attribute subactivities.



469
470
471
# File 'lib/xcresult/models.rb', line 469

def subactivities
  @subactivities
end

#titleObject

Returns the value of attribute title.



463
464
465
# File 'lib/xcresult/models.rb', line 463

def title
  @title
end

#uuidObject

Returns the value of attribute uuid.



465
466
467
# File 'lib/xcresult/models.rb', line 465

def uuid
  @uuid
end