]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
Small re-factor.
authorKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Sat, 12 Mar 2011 23:15:02 +0000 (23:15 +0000)
committerKrzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Sat, 12 Mar 2011 23:15:02 +0000 (23:15 +0000)
load_vars.rb

index 02e99a01e81492040eb394cb5a6ada1dbe057570..ddfc0ef77b04a8b3c7602a7786ca3ec417069591 100644 (file)
 module Puppet::Parser::Functions
   newfunction(:load_vars, :type => :statement) do |arguments|
 
-    number_of_arguments = arguments.size
-
-    if number_of_arguments < 2
-      raise(Puppet::ParseError, "Wrong number of arguments " +
-        "given (#{number_of_arguments} for 2)")
-    end
+    raise(Puppet::ParseError, "Wrong number of arguments " +
+      "given (#{arguments.size} for 2)") if arguments.size < 2
 
     data = {}