From e4c46ca958c52284e608b6f8b6df762f0b2dccec Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 19 Jul 2010 02:28:22 +0300 Subject: [PATCH] give back full access to the label object of keys --- lib/redistat/key.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/redistat/key.rb b/lib/redistat/key.rb index dd85108..d4969b2 100644 --- a/lib/redistat/key.rb +++ b/lib/redistat/key.rb @@ -12,16 +12,17 @@ module Redistat @options = options end - def label - if !@label.nil? - (options[:hash_label] ||= true) ? @label.hash : @label.name - end - end + #TODO figure out if direct access to the label object is desired or not + # def label + # if !@label.nil? + # (@options[:hash_label] ||= true) ? @label.hash : @label.name + # end + # end def to_s(depth = nil) depth ||= @options[:depth] if !@options[:depth].nil? key = "#{@scope}" - key << "/#{label}" if !label.nil? + key << "/#{@label.hash}" if !label.nil? key << ":#{@date.to_s(depth)}" end