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