Skip to content

Commit

Permalink
Corrected function name from chop to strip. Moved to unless from if not
Browse files Browse the repository at this point in the history
to improve code clarity.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
  • Loading branch information
kwilczynski committed Apr 30, 2011
1 parent 4179802 commit 16eec26
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions strip.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

module Puppet::Parser::Functions
newfunction(:chop, :type => :rvalue, :doc => <<-EOS
newfunction(:strip, :type => :rvalue, :doc => <<-EOS
EOS
) do |arguments|

Expand All @@ -13,8 +13,8 @@ module Puppet::Parser::Functions
value = arguments[0]
klass = value.class

if not [Array, String].include?(klass)
raise(Puppet::ParseError, 'strip(): Requires either an ' +
unless [Array, String].include?(klass)
raise(Puppet::ParseError, 'strip(): Requires either ' +
'array or string to work with')
end

Expand Down

0 comments on commit 16eec26

Please sign in to comment.