mirror of
https://github.com/jimeh/redistat.git
synced 2026-02-19 13:26:39 +00:00
create Label#join method for easily joining Labels
This commit is contained in:
@@ -11,6 +11,11 @@ module Redistat
|
||||
self.new(name, opts).save
|
||||
end
|
||||
|
||||
def self.join(*args)
|
||||
args = args.map {|i| i.to_s}
|
||||
self.new(args.reject {|i| i.blank? }.join(GROUP_SEPARATOR))
|
||||
end
|
||||
|
||||
def initialize(str, opts = {})
|
||||
parse_options(opts)
|
||||
@raw = str.to_s
|
||||
|
||||
Reference in New Issue
Block a user