class RedPack::MsgIdGenerator

Attributes

cur[RW]

Public Class Methods

new(cur=1) click to toggle source
# File lib/redpack-ruby/clients.rb, line 32
def initialize(cur=1)
  @cur = cur
end

Public Instance Methods

next() click to toggle source
# File lib/redpack-ruby/clients.rb, line 36
def next
  if @cur < Integer::MAX then
    @cur = @cur.succ
  else
    @cur = 1
  end
  return @cur
end