Class: Redistat::Scope
- Inherits:
-
Object
- Object
- Redistat::Scope
- Includes:
- Database
- Defined in:
- lib/redistat/scope.rb
Instance Method Summary (collapse)
-
- (Scope) initialize(name)
constructor
A new instance of Scope.
- - (Object) next_id
- - (Object) to_s
Methods included from Database
Constructor Details
- (Scope) initialize(name)
A new instance of Scope
5 6 7 |
# File 'lib/redistat/scope.rb', line 5 def initialize(name) @name = name.to_s end |
Instance Method Details
- (Object) next_id
13 14 15 |
# File 'lib/redistat/scope.rb', line 13 def next_id db.incr("#{@name}#{KEY_NEXT_ID}") end |
- (Object) to_s
9 10 11 |
# File 'lib/redistat/scope.rb', line 9 def to_s @name end |