mirror of
https://github.com/jimeh/redistat.git
synced 2026-02-19 13:26:39 +00:00
give back full access to the label object of keys
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user