class Bunny::VersionedDeliveryTag
Wraps a delivery tag (which is an integer) so that {Bunny::Channel} could detect stale tags after connection recovery.
@private
Attributes
Public Class Methods
Source
# File lib/bunny/versioned_delivery_tag.rb, line 12 def initialize(tag, version) raise ArgumentError.new("tag cannot be nil") unless tag raise ArgumentError.new("version cannot be nil") unless version @tag = tag.to_i @version = version.to_i end
Public Instance Methods
Source
# File lib/bunny/versioned_delivery_tag.rb, line 24 def stale?(version) raise ArgumentError.new("version cannot be nil") unless version @version < version.to_i end