set #scope rather than #class_name as the preferred method for setting the scope value within a Redistat::Model

This commit is contained in:
2011-03-16 00:56:59 +00:00
parent a983e554c6
commit 2e2d3273cc
3 changed files with 6 additions and 6 deletions

View File

@@ -39,12 +39,12 @@ module Redistat
#
option_accessor :depth
option_accessor :class_name
option_accessor :scope
option_accessor :store_event
option_accessor :hashed_label
option_accessor :label_indexing
alias :scope :class_name
alias :class_name :scope
def connect_to(opts = {})
Connection.create(opts.merge(:ref => name))
@@ -62,7 +62,7 @@ module Redistat
alias :redis :connection
def name
options[:class_name] || (@name ||= self.to_s)
options[:scope] || (@name ||= self.to_s)
end
end