Class: AMQ::Protocol::Connection::Secure

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Method

encode_body, index, inherited, instantiate, method_id, methods, name, split_headers

Constructor Details

#initialize(challenge) ⇒ Secure

Returns a new instance of Secure.



287
288
289
# File 'lib/amq/protocol/client.rb', line 287

def initialize(challenge)
  @challenge = challenge
end

Instance Attribute Details

#challengeObject (readonly)

Returns the value of attribute challenge.



286
287
288
# File 'lib/amq/protocol/client.rb', line 286

def challenge
  @challenge
end

Class Method Details

.decode(data) ⇒ Object

Returns:



277
278
279
280
281
282
283
284
# File 'lib/amq/protocol/client.rb', line 277

def self.decode(data)
  offset = 0
  length = data[offset, 4].unpack(PACK_UINT32).first
  offset += 4
  challenge = data[offset, length]
  offset += length
  self.new(challenge)
end

.has_content?Boolean

Returns:

  • (Boolean)


291
292
293
# File 'lib/amq/protocol/client.rb', line 291

def self.has_content?
  false
end