diff options
author | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2011-04-23 01:18:52 +0100 |
---|---|---|
committer | Krzysztof Wilczynski <krzysztof.wilczynski@linux.com> | 2011-04-23 01:18:52 +0100 |
commit | 55c94178ebec564cb27a1394a2fa0a970bf03621 (patch) | |
tree | 9623bbd87b1443c2e0167340cfbaf1f5a99177a1 /persistent_crontab_minutes.rb | |
parent | e1bb7393bb5e73afc1813bfe1c27f38c227a9dc3 (diff) |
Minor changes. Added placeholder for :doc in Puppet's newfunction to fill later.
Diffstat (limited to 'persistent_crontab_minutes.rb')
-rw-r--r-- | persistent_crontab_minutes.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/persistent_crontab_minutes.rb b/persistent_crontab_minutes.rb index 5a76868..cd80094 100644 --- a/persistent_crontab_minutes.rb +++ b/persistent_crontab_minutes.rb @@ -2,14 +2,16 @@ # persistent_crontab_minutes.rb # -require 'md5' - module Puppet::Parser::Functions - newfunction(:persistent_crontab_minutes, :type => :rvalue) do |arguments| + newfunction(:persistent_crontab_minutes, :type => :rvalue, :doc => <<-EOS + EOS + ) do |arguments| raise(Puppet::ParseError, "Wrong number of arguments " + "given (#{arguments.size} for 2)") if arguments.size < 2 + require 'md5' + value = 0 job = arguments[0] @@ -55,7 +57,7 @@ module Puppet::Parser::Functions parser.watch_file(file) if File.exists?(file) return value - end # def newfunction -end # module Puppet::Parser::Functions + end +end # vim: set ts=2 sw=2 et : |