class Puppet::Settings::PrioritySetting

A setting that represents a scheduling priority, and evaluates to an OS-specific priority level.

Constants

PRIORITY_MAP

Public Instance Methods

munge(value) click to toggle source
   # File lib/puppet/settings/priority_setting.rb
29 def munge(value)
30   return unless value
31 
32   case
33   when value.is_a?(Integer)
34     value
35   when (value.is_a?(String) and value =~ /\d+/)
36     value.to_i
37   when (value.is_a?(String) and PRIORITY_MAP[value.to_sym])
38     PRIORITY_MAP[value.to_sym]
39   else
40     raise Puppet::Settings::ValidationError, _("Invalid priority format '%{value}' for parameter: %{name}") % { value: value.inspect, name: @name }
41   end
42 end
type() click to toggle source
   # File lib/puppet/settings/priority_setting.rb
25 def type
26   :priority
27 end