Sha256: ddd01a369357c93dc5551d87f9f0e51abacfce35270cd3e6c7d98d5b380becce

Contents?: true

Size: 363 Bytes

Versions: 32

Compression:

Stored size: 363 Bytes

Contents

# frozen_string_literal: true

class Puppet::Settings::ArraySetting < Puppet::Settings::BaseSetting
  def type
    :array
  end

  def munge(value)
    case value
    when String
      value.split(/\s*,\s*/)
    when Array
      value
    else
      raise ArgumentError, _("Expected an Array or String, got a %{klass}") % { klass: value.class }
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
puppet-8.10.0 lib/puppet/settings/array_setting.rb
puppet-8.10.0-x86-mingw32 lib/puppet/settings/array_setting.rb
puppet-8.10.0-x64-mingw32 lib/puppet/settings/array_setting.rb
puppet-8.10.0-universal-darwin lib/puppet/settings/array_setting.rb
puppet-8.9.0 lib/puppet/settings/array_setting.rb
puppet-8.9.0-x86-mingw32 lib/puppet/settings/array_setting.rb
puppet-8.9.0-x64-mingw32 lib/puppet/settings/array_setting.rb
puppet-8.9.0-universal-darwin lib/puppet/settings/array_setting.rb
puppet-8.8.1 lib/puppet/settings/array_setting.rb
puppet-8.8.1-x86-mingw32 lib/puppet/settings/array_setting.rb
puppet-8.8.1-x64-mingw32 lib/puppet/settings/array_setting.rb
puppet-8.8.1-universal-darwin lib/puppet/settings/array_setting.rb
puppet-8.7.0 lib/puppet/settings/array_setting.rb
puppet-8.7.0-x86-mingw32 lib/puppet/settings/array_setting.rb
puppet-8.7.0-x64-mingw32 lib/puppet/settings/array_setting.rb
puppet-8.7.0-universal-darwin lib/puppet/settings/array_setting.rb
puppet-8.6.0 lib/puppet/settings/array_setting.rb
puppet-8.6.0-x86-mingw32 lib/puppet/settings/array_setting.rb
puppet-8.6.0-x64-mingw32 lib/puppet/settings/array_setting.rb
puppet-8.6.0-universal-darwin lib/puppet/settings/array_setting.rb