lib/hieracles/formats/console.rb in hieracles-0.1.5 vs lib/hieracles/formats/console.rb in hieracles-0.1.6
- old
+ new
@@ -50,19 +50,19 @@
end
def build_params_line(key, value, filter)
output = ''
if !filter || Regexp.new(filter).match(key)
- first = value.shift
+ first = value.pop
filecolor_index = @colors[first[:file]]
filecolor = COLORS[filecolor_index]
output << format("#{filecolor} #{COLORS[5]} %s\n",
"[#{filecolor_index}]",
key,
first[:value].to_s.gsub('%', '%%')
)
while value.count > 0
- overriden = value.shift
+ overriden = value.pop
filecolor_index = @colors[overriden[:file]]
output << format(" #{COLORS[8]}\n",
"[#{filecolor_index}] #{key} #{overriden[:value]}"
)
end