Sha256: ffd4390239b549008a3e86c9aa225775021c27987f0a8532ae364d0fb8e9dfb0

Contents?: true

Size: 234 Bytes

Versions: 19

Compression:

Stored size: 234 Bytes

Contents

module Redistat
  class Scope
    include Database
    
    def initialize(name)
      @name = name.to_s
    end
    
    def to_s
      @name
    end
    
    def next_id
      db.incr("#{@name}#{KEY_NEXT_ID}")
    end
    
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
redistat-0.3.0 lib/redistat/scope.rb
redistat-0.2.6 lib/redistat/scope.rb
redistat-0.2.5 lib/redistat/scope.rb
redistat-0.2.4 lib/redistat/scope.rb
redistat-0.2.3 lib/redistat/scope.rb
redistat-0.2.2 lib/redistat/scope.rb
redistat-0.2.1 lib/redistat/scope.rb
redistat-0.2.0 lib/redistat/scope.rb
redistat-0.1.1 lib/redistat/scope.rb
redistat-0.1.0 lib/redistat/scope.rb
redistat-0.0.9 lib/redistat/scope.rb
redistat-0.0.8 lib/redistat/scope.rb
redistat-0.0.7 lib/redistat/scope.rb
redistat-0.0.6 lib/redistat/scope.rb
redistat-0.0.5 lib/redistat/scope.rb
redistat-0.0.4 lib/redistat/scope.rb
redistat-0.0.3 lib/redistat/scope.rb
redistat-0.0.2 lib/redistat/scope.rb
redistat-0.0.1 lib/redistat/scope.rb