Sha256: ed14459b38518583d0449c8b25928c6d2601ea567819ccb59c68add087bba759
Contents?: true
Size: 453 Bytes
Versions: 28
Compression:
Stored size: 453 Bytes
Contents
# frozen_string_literal: true class Puppet::Settings::IntegerSetting < Puppet::Settings::BaseSetting def munge(value) return value if value.is_a?(Integer) begin value = Integer(value) rescue ArgumentError, TypeError raise Puppet::Settings::ValidationError, _("Cannot convert '%{value}' to an integer for parameter: %{name}") % { value: value.inspect, name: @name } end value end def type :integer end end
Version data entries
28 entries across 28 versions & 1 rubygems