lib/bolt/pal/yaml_plan/parameter.rb in bolt-1.39.0 vs lib/bolt/pal/yaml_plan/parameter.rb in bolt-1.40.0

- old
+ new

@@ -2,20 +2,21 @@ module Bolt class PAL class YamlPlan class Parameter - attr_reader :name, :value, :type_expr + attr_reader :name, :value, :type_expr, :description PARAMETER_KEYS = Set['type', 'default', 'description'] def initialize(param, definition) definition ||= {} validate_param(param, definition) @name = param @value = definition['default'] @type_expr = Puppet::Pops::Types::TypeParser.singleton.parse(definition['type']) if definition['type'] + @description = definition['description'] end def validate_param(param, definition) unless param.is_a?(String) && param.match?(Bolt::PAL::YamlPlan::VAR_NAME_PATTERN) raise Bolt::Error.new("Invalid parameter name #{param.inspect}", "bolt/invalid-plan")