Class: Packer::Message::Ui

Inherits:
Base
  • Object
show all
Defined in:
lib/packer/message/ui.rb

Overview

Represents a message destined for a UI

Instance Attribute Summary collapse

Attributes inherited from Base

#data, #target, #timestamp, #type

Class Method Summary collapse

Instance Attribute Details

#outputObject

The string output to be displayed by the UI



9
10
11
# File 'lib/packer/message/ui.rb', line 9

def output
  @output
end

#ui_message_typeObject

The type of UI message



6
7
8
# File 'lib/packer/message/ui.rb', line 6

def ui_message_type
  @ui_message_type
end

Class Method Details

.from_fields(fields) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • fields (Array<String>)


13
14
15
16
17
18
19
20
21
22
# File 'lib/packer/message/ui.rb', line 13

def self.from_fields(fields)
  msg = new
  msg.timestamp = fields[0]
  msg.target = fields[1]
  msg.type = fields[2]
  msg.data = fields[3..-1]
  msg.ui_message_type = fields[3]
  msg.output = fields[4]
  msg
end