Sha256: 93af778c320c9bc67bad286343650dc78dccadec92e24995ac21e6c68567cef0

Contents?: true

Size: 574 Bytes

Versions: 320

Compression:

Stored size: 574 Bytes

Contents

class Puppet::Settings::ServerListSetting < Puppet::Settings::ArraySetting

  def type
    :server_list
  end

  def print(value)
    if value.is_a?(Array)
      #turn into a string
      value.map {|item| item.join(":") }.join(",")
    else
      value
    end
  end
  
  def munge(value)
    servers = super 
    servers.map! { |server| 
      case server
      when String
        server.split(':')
      when Array
        server
      else
        raise ArgumentError, _("Expected an Array of String, got a %{klass}") % { klass: value.class }
      end
    }
  end
end

Version data entries

320 entries across 320 versions & 1 rubygems

Version Path
puppet-7.34.0 lib/puppet/settings/server_list_setting.rb
puppet-7.34.0-x86-mingw32 lib/puppet/settings/server_list_setting.rb
puppet-7.34.0-x64-mingw32 lib/puppet/settings/server_list_setting.rb
puppet-7.34.0-universal-darwin lib/puppet/settings/server_list_setting.rb
puppet-7.33.0 lib/puppet/settings/server_list_setting.rb
puppet-7.33.0-x86-mingw32 lib/puppet/settings/server_list_setting.rb
puppet-7.33.0-x64-mingw32 lib/puppet/settings/server_list_setting.rb
puppet-7.33.0-universal-darwin lib/puppet/settings/server_list_setting.rb
puppet-7.32.1 lib/puppet/settings/server_list_setting.rb
puppet-7.32.1-x86-mingw32 lib/puppet/settings/server_list_setting.rb
puppet-7.32.1-x64-mingw32 lib/puppet/settings/server_list_setting.rb
puppet-7.32.1-universal-darwin lib/puppet/settings/server_list_setting.rb
puppet-7.31.0 lib/puppet/settings/server_list_setting.rb
puppet-7.31.0-x86-mingw32 lib/puppet/settings/server_list_setting.rb
puppet-7.31.0-x64-mingw32 lib/puppet/settings/server_list_setting.rb
puppet-7.31.0-universal-darwin lib/puppet/settings/server_list_setting.rb
puppet-7.30.0 lib/puppet/settings/server_list_setting.rb
puppet-7.30.0-x86-mingw32 lib/puppet/settings/server_list_setting.rb
puppet-7.30.0-x64-mingw32 lib/puppet/settings/server_list_setting.rb
puppet-7.30.0-universal-darwin lib/puppet/settings/server_list_setting.rb