Class: AMQ::Protocol::GetResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/amq/protocol/get_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(method) ⇒ GetResponse

Returns a new instance of GetResponse.



8
9
10
# File 'lib/amq/protocol/get_response.rb', line 8

def initialize(method)
  @method = method
end

Instance Attribute Details

#methodObject (readonly)

Returns the value of attribute method.



7
8
9
# File 'lib/amq/protocol/get_response.rb', line 7

def method
  @method
end

Instance Method Details

#cluster_idObject

GetEmpty attributes



48
49
50
51
52
# File 'lib/amq/protocol/get_response.rb', line 48

def cluster_id
  if @method.respond_to?(:cluster_id)
    @method.cluster_id
  end
end

#delivery_tagObject

GetOk attributes



17
18
19
20
21
# File 'lib/amq/protocol/get_response.rb', line 17

def delivery_tag
  if @method.respond_to?(:delivery_tag)
    @method.delivery_tag
  end
end

#empty?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/amq/protocol/get_response.rb', line 12

def empty?
  @method.is_a?(::AMQ::Protocol::Basic::GetEmpty)
end

#exchangeObject



29
30
31
32
33
# File 'lib/amq/protocol/get_response.rb', line 29

def exchange
  if @method.respond_to?(:exchange)
    @method.exchange
  end
end

#message_countObject



41
42
43
44
45
# File 'lib/amq/protocol/get_response.rb', line 41

def message_count
  if @method.respond_to?(:message_count)
    @method.message_count
  end
end

#redeliveredObject



23
24
25
26
27
# File 'lib/amq/protocol/get_response.rb', line 23

def redelivered
  if @method.respond_to?(:redelivered)
    @method.redelivered
  end
end

#routing_keyObject



35
36
37
38
39
# File 'lib/amq/protocol/get_response.rb', line 35

def routing_key
  if @method.respond_to?(:routing_key)
    @method.routing_key
  end
end