# File lib/aws/simple_workflow/history_event.rb, line 68 def initialize workflow_execution, details @workflow_execution = workflow_execution @details = details.is_a?(String) ? JSON.parse(details) : details @event_type = @details['eventType'] @event_id = @details['eventId'] @created_at = Time.at(@details['eventTimestamp']) attributes_key = "#{event_type}EventAttributes" attributes_key[0] = attributes_key[0,1].downcase attribute_data = @details[attributes_key] || {} @attributes = Attributes.new(workflow_execution, attribute_data) super end