Puppet Function: cfpuppetserver::uriparse
- Defined in:
-
lib/puppet/functions/cfpuppetserver/uriparse.rb
- Function type:
- Ruby 4.x API
Overview
cfpuppetserver::uriparse(String[1] $uri) ⇒ Any
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/puppet/functions/cfpuppetserver/uriparse.rb', line 7
Puppet::Functions.create_function(:'cfpuppetserver::uriparse') do
dispatch :cf_uriparse do
param 'String[1]', :uri
end
def cf_uriparse(uri)
uri = URI.parse uri
ret = {}
['scheme', 'host', 'path', 'query', 'fragment'].each { |k|
ret[k] = uri.send(k)
}
return ret
end
end
|