mirror of
https://github.com/jimeh/redistat.git
synced 2026-02-19 05:16:39 +00:00
Make Model.expire act like the other options, and add tests for it
This commit is contained in:
@@ -46,8 +46,12 @@ module Redistat
|
||||
|
||||
alias :class_name :scope
|
||||
|
||||
def expire(exp)
|
||||
options[:expire] = exp.is_a?(Hash) ? exp : Hash.new(exp)
|
||||
def expire(exp = nil)
|
||||
if !exp.nil?
|
||||
options[:expire] = exp.is_a?(Hash) ? exp : Hash.new(exp)
|
||||
else
|
||||
options[:expire]
|
||||
end
|
||||
end
|
||||
|
||||
def connect_to(opts = {})
|
||||
|
||||
Reference in New Issue
Block a user