Class: Packer::Output::Fix
Overview
Represents the output from packer fix.
Instance Method Summary collapse
-
#json ⇒ String
JSON representing the fixed template or
nilif the fixing fails or the template is not valid. -
#valid? ⇒ Boolean
Returns
trueif the fixing was successful and the template is valid.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Packer::Output::Base
Instance Method Details
#json ⇒ String
JSON representing the fixed template or nil if the fixing fails or the template is not valid.
11 12 13 14 15 |
# File 'lib/packer/output/fix.rb', line 11 def json return nil unless valid? stdout end |
#valid? ⇒ Boolean
Returns true if the fixing was successful and the template is valid.
20 21 22 |
# File 'lib/packer/output/fix.rb', line 20 def valid? @output.exitstatus.zero? end |