Sha256: 53b89c2cfce048df25d7e978d5c9d40ab6fd9880d8461b69e27ce92553f33527
Contents?: true
Size: 637 Bytes
Versions: 28
Compression:
Stored size: 637 Bytes
Contents
module GorgonBunny # Wraps a delivery tag (which is an integer) so that {GorgonBunny::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
28 entries across 28 versions & 1 rubygems