Class: Packer::Message::Base
- Inherits:
-
Object
- Object
- Packer::Message::Base
- Defined in:
- lib/packer/message/base.rb
Overview
Base class for all message types
Direct Known Subclasses
Artifact, ArtifactFile, Error, TemplateBuilder, TemplateProvisioner, TemplateVariable, Ui
Instance Attribute Summary collapse
-
#data ⇒ Object
Zero or more values associated with the message type.
-
#target ⇒ Object
Target of the following output.
-
#timestamp ⇒ Object
Unix timestamp in UTC of when the message was printed.
-
#type ⇒ Object
Type of message outputted by Packer.
Class Method Summary collapse
- .from_fields(fields) ⇒ Object private
Instance Attribute Details
#data ⇒ Object
Zero or more values associated with the message type
15 16 17 |
# File 'lib/packer/message/base.rb', line 15 def data @data end |
#target ⇒ Object
Target of the following output
9 10 11 |
# File 'lib/packer/message/base.rb', line 9 def target @target end |
#timestamp ⇒ Object
Unix timestamp in UTC of when the message was printed
6 7 8 |
# File 'lib/packer/message/base.rb', line 6 def @timestamp end |
#type ⇒ Object
Type of message outputted by Packer
12 13 14 |
# File 'lib/packer/message/base.rb', line 12 def type @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.
19 20 21 22 23 24 25 26 |
# File 'lib/packer/message/base.rb', line 19 def self.from_fields(fields) msg = new msg. = fields[0] msg.target = fields[1] msg.type = fields[2] msg.data = fields[3..-1] msg end |