Puppet Function: make_url

Defined in:
puppet/modules/wmflib/lib/puppet/parser/functions/make_url.rb
Function type:
Ruby 3.x API

Overview

make_url()Any

Takes a base URL and a hash of parameters and turns them into a properly encoded URL.

Returns:

  • (Any)


13
14
15
16
17
18
19
20
21
# File 'puppet/modules/wmflib/lib/puppet/parser/functions/make_url.rb', line 13

newfunction(:make_url, :type => :rvalue, :doc => <<-EOS
  Takes a base URL and a hash of parameters and turns
  them into a properly encoded URL.
  EOS
) do |args|
  raise(Puppet::ParseError, 'make_url(): Wrong number of arguments') if args.length != 1
  raise(Puppet::ParseError, 'make_url(): Argument must be a hash') unless args[0].class == Hash
  make_url(args[0])
end