Puppet Function: complyadm::encode

Defined in:
lib/puppet/functions/complyadm/encode.rb
Function type:
Ruby 4.x API

Summary

Encodes a string

Overview

complyadm::encode(String[1] $value)String[1]

Parameters:

  • value (String[1])

    A string with the value to encode

Returns:

  • (String[1])

    A URI encoded version of the string



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/puppet/functions/complyadm/encode.rb', line 5

Puppet::Functions.create_function(:'complyadm::encode') do
  # @param value A string with the value to encode
  # @return A URI encoded version of the string
  dispatch :encode do
    param 'String[1]', :value
    return_type 'String[1]'
  end

  def encode(value)
    CGI.escape(value)
  end
end