Skip to content

Commit

Permalink
(maint) Fix indentation of range function
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Dalén committed Nov 12, 2014
1 parent 85d7edd commit e61f402
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions lib/puppet/parser/functions/range.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,21 @@ module Puppet::Parser::Functions
end
end

# Check whether we have integer value if so then make it so ...
if start.match(/^\d+$/)
start = start.to_i
stop = stop.to_i
else
start = start.to_s
stop = stop.to_s
end
# Check whether we have integer value if so then make it so ...
if start.match(/^\d+$/)
start = start.to_i
stop = stop.to_i
else
start = start.to_s
stop = stop.to_s
end

range = case type
when /^(\.\.|\-)$/ then (start .. stop)
when /^(\.\.\.)$/ then (start ... stop) # Exclusive of last element ...
end
range = case type
when /^(\.\.|\-)$/ then (start .. stop)
when /^(\.\.\.)$/ then (start ... stop) # Exclusive of last element ...
end

result = range.step(step).collect { |i| i } # Get them all ... Pokemon ...
result = range.step(step).collect { |i| i } # Get them all ... Pokemon ...

return result
end
Expand Down

0 comments on commit e61f402

Please sign in to comment.