summaryrefslogtreecommitdiffstats
path: root/lib/puppet/parser/functions
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2009-03-27 12:06:54 +1100
committerJames Turnbull <james@lovedthanlost.net>2009-03-27 12:06:54 +1100
commit843cc6e50586fa6667ba95d1d1c46bb1eefff23c (patch)
treef12c025e36324c8760d632de8631c73670c316d2 /lib/puppet/parser/functions
parent6160aafe86e48d545583a2e9e093754ac32a5ced (diff)
downloadpuppet-843cc6e50586fa6667ba95d1d1c46bb1eefff23c.tar.gz
puppet-843cc6e50586fa6667ba95d1d1c46bb1eefff23c.tar.xz
puppet-843cc6e50586fa6667ba95d1d1c46bb1eefff23c.zip
Fixed RST for functions
Diffstat (limited to 'lib/puppet/parser/functions')
-rw-r--r--lib/puppet/parser/functions/regsubst.rb8
-rw-r--r--lib/puppet/parser/functions/sprintf.rb9
2 files changed, 5 insertions, 12 deletions
diff --git a/lib/puppet/parser/functions/regsubst.rb b/lib/puppet/parser/functions/regsubst.rb
index 067d75c51..7499faaee 100644
--- a/lib/puppet/parser/functions/regsubst.rb
+++ b/lib/puppet/parser/functions/regsubst.rb
@@ -1,7 +1,6 @@
module Puppet::Parser::Functions
newfunction(:regsubst, :type => :rvalue,
- :doc => "\
- Perform regexp replacement on a string.
+ :doc => "Perform regexp replacement on a string.
Parameters (in order):
@@ -55,9 +54,8 @@ module Puppet::Parser::Functions
Put angle brackets around each octet in the node's IP address: ::
- $x = regsubst($ipaddress, '([0-9]+)', '<\\\\1>', 'G')
- ") \
- do |args|
+ $x = regsubst($ipaddress, '([0-9]+)', '<\\\\1>', 'G')") \
+ do |args|
flag_mapping = {
"E" => Regexp::EXTENDED,
"I" => Regexp::IGNORECASE,
diff --git a/lib/puppet/parser/functions/sprintf.rb b/lib/puppet/parser/functions/sprintf.rb
index 79744104d..f6daeff49 100644
--- a/lib/puppet/parser/functions/sprintf.rb
+++ b/lib/puppet/parser/functions/sprintf.rb
@@ -1,13 +1,8 @@
module Puppet::Parser::Functions
newfunction(:sprintf, :type => :rvalue,
- :doc => "\
- Perform printf-style formatting of text.
+ :doc => "Perform printf-style formatting of text.
- The first parameter is format string describing how the rest of the
- parameters should be formatted. See the documentation for the
- ``Kernel::sprintf()`` function in Ruby for all the details.
- ") \
- do |args|
+ The first parameter is format string describing how the rest of the parameters should be formatted. See the documentation for the ``Kernel::sprintf()`` function in Ruby for all the details.") do |args|
if args.length < 1
raise Puppet::ParseError, 'sprintf() needs at least one argument'
end