Sha256: 79430561877141a9e52b6a185b00e7449c2d96f5d411c18203c2c68475215c72

Contents?: true

Size: 395 Bytes

Versions: 122

Compression:

Stored size: 395 Bytes

Contents

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 '#{values.join("', '")}'"
    end
  end
end

Version data entries

122 entries across 122 versions & 2 rubygems

Version Path
puppet-retrospec-1.8.0 vendor/pup410/lib/puppet/settings/symbolic_enum_setting.rb
puppet-retrospec-1.7.0 vendor/pup410/lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.12 lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.12-x86-mingw32 lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.12-x64-mingw32 lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.12-universal-darwin lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.11 lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.11-x86-mingw32 lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.11-x64-mingw32 lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.11-universal-darwin lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.10 lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.10-x86-mingw32 lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.10-x64-mingw32 lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.10-universal-darwin lib/puppet/settings/symbolic_enum_setting.rb
puppet-retrospec-1.6.1 vendor/pup410/lib/puppet/settings/symbolic_enum_setting.rb
puppet-retrospec-1.6.0 vendor/pup410/lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.9 lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.9-x86-mingw32 lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.9-x64-mingw32 lib/puppet/settings/symbolic_enum_setting.rb
puppet-4.10.9-universal-darwin lib/puppet/settings/symbolic_enum_setting.rb