Parent

Methods

Class/Module Index [+]

Quicksearch

Bunny::VersionedDeliveryTag

Wraps a delivery tag (which is an integer) so that {Bunny::Channel} could detect stale tags after connection recovery.

@private

Attributes

tag[R]
version[R]

Public Class Methods

new(tag, version) click to toggle source
# File lib/bunny/versioned_delivery_tag.rb, line 10
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

Public Instance Methods

stale?(version) click to toggle source
# File lib/bunny/versioned_delivery_tag.rb, line 22
def stale?(version)
  raise ArgumentError.new("version cannot be nil") unless version

  @version < version
end
to_i() click to toggle source
# File lib/bunny/versioned_delivery_tag.rb, line 18
def to_i
  @tag
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.