Sha256: 1e867a91d657397d28faf14b09c8dfdf2b812183f84d0f97fd6318eac8c6a2b0
Contents?: true
Size: 629 Bytes
Versions: 40
Compression:
Stored size: 629 Bytes
Contents
module MarchHare # Wraps a delivery tag (which is an integer) so that {Bunny::Channel} could # detect stale tags after connection recovery. # # @private class VersionedDeliveryTag attr_reader :tag attr_reader :version def initialize(tag, version) raise ArgumentError.new("tag cannot be nil") unless tag raise ArgumentError.new("version cannot be nil") unless version @tag = tag @version = version end def to_i @tag end def stale?(version) raise ArgumentError.new("version cannot be nil") unless version @version < version end end end
Version data entries
40 entries across 40 versions & 1 rubygems