class Packer::Message::TemplateVariable

Message representing a user variable defined within the template

@see www.packer.io/docs/machine-readable/command-inspect.html

Attributes

default[RW]

The default value of the variable

name[RW]

The name of the variable

required[RW]

If non-zero, then this variable is required

Public Class Methods

from_fields(fields) click to toggle source

@api private @param [Array<String>] fields

# File lib/packer/message/template_variable.rb, line 18
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.name = fields[3]
  msg.default = fields[4]
  msg.required = fields[5]
  msg
end