Puppet Function: st2::urlencode
- Defined in:
- lib/puppet/functions/st2/urlencode.rb
- Function type:
- Ruby 4.x API
Overview
URL encodes a string
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/puppet/functions/st2/urlencode.rb', line 4 Puppet::Functions.create_function(:'st2::urlencode') do # @param url Raw URL data to encode # @return [String] URL encoded data # @example Basic usage # st2::urlencode('xyz!123') dispatch :urlencode do param 'String', :url end def urlencode(url) CGI.escape(url) end end |