lib/hieracles/formats/plain.rb in hieracles-0.1.5 vs lib/hieracles/formats/plain.rb in hieracles-0.1.6
- old
+ new
@@ -37,14 +37,14 @@
end
def build_params_line(key, value, filter)
output = ''
if !filter || Regexp.new(filter).match(key)
- first = value.shift
+ first = value.pop
filecolor_index = @index[first[:file]]
output << "[#{filecolor_index}] #{key} #{first[:value]}\n"
while value.count > 0
- overriden = value.shift
+ overriden = value.pop
filecolor_index = @index[overriden[:file]]
output << " [#{filecolor_index}] #{key} #{overriden[:value]}\n"
end
end
output