lib/puppet/resource_api/parameter.rb in puppet-resource_api-1.8.13 vs lib/puppet/resource_api/parameter.rb in puppet-resource_api-1.8.14
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require 'puppet/util'
require 'puppet/parameter'
module Puppet; module ResourceApi; end; end # predeclare the main module # rubocop:disable Style/Documentation,Style/ClassAndModuleChildren
@@ -11,14 +13,14 @@
# @param type_name the name of the Puppet Type
# @param data_type the data type of parameter instance
# @param attribute_name the name of attribue of the parameter
# @param resource_hash the resource hash instance which is passed to the
# parent class.
- def initialize(type_name, data_type, attribute_name, resource_hash)
+ def initialize(type_name, data_type, attribute_name, resource_hash, _referrable_type = nil)
@type_name = type_name
@data_type = data_type
@attribute_name = attribute_name
- super(resource_hash) # Pass resource to parent Puppet class.
+ super(**resource_hash) # Pass resource to parent Puppet class.
end
# This method assigns value to the parameter and cleans value.
# @param value the value to be set and clean
# @return [type] the cleaned value