]> gitweb.fluxo.info Git - puppet-stdlib.git/commitdiff
(maint) Fix indentation of range function
authorErik Dalén <dalen@spotify.com>
Wed, 12 Nov 2014 14:52:33 +0000 (15:52 +0100)
committerErik Dalén <dalen@spotify.com>
Wed, 12 Nov 2014 14:52:33 +0000 (15:52 +0100)
lib/puppet/parser/functions/range.rb

index ffbdf84630d09d4a45ced389365290b6e52ab121..06d75d408e9c035be0cc18997362512b5d8575c9 100644 (file)
@@ -65,21 +65,21 @@ Will return: [0,2,4,6,8]
       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