CHips L MINI SHELL

CHips L pro

Current Path : /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/settings/
Upload File :
Current File : //opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/settings/symbolic_enum_setting.rb

class Puppet::Settings::SymbolicEnumSetting < Puppet::Settings::BaseSetting
  attr_accessor :values

  def type
    :symbolic_enum
  end

  def munge(value)
    sym = value.to_sym
    if values.include?(sym)
      sym
    else
      raise Puppet::Settings::ValidationError,
        _("Invalid value '%{value}' for parameter %{name}. Allowed values are '%{allowed_values}'") % { value: value, name: @name, allowed_values: values.join("', '") }
    end
  end
end

Copyright 2K16 - 2K18 Indonesian Hacker Rulez