make Redistat::Key abide by the hash_label option

This commit is contained in:
2010-07-19 12:03:55 +03:00
parent 8a22b2134b
commit 9403aacd96
2 changed files with 9 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ module Redistat
def to_s(depth = nil)
depth ||= @options[:depth] if !@options[:depth].nil?
key = "#{@scope}"
key << "/#{@label.hash}" if !label.nil?
key << "/" + ((@options[:hash_label].nil? || @options[:hash_label] == true) ? @label.hash : @label.name) if !label.nil?
key << ":#{@date.to_s(depth)}"
end