Class: Denko::Connection::HandshakeAttempt
- Inherits:
-
Object
- Object
- Denko::Connection::HandshakeAttempt
- Defined in:
- lib/denko/connection/handshake.rb
Instance Attribute Summary collapse
-
#acknowledged ⇒ Object
readonly
Returns the value of attribute acknowledged.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize ⇒ HandshakeAttempt
constructor
A new instance of HandshakeAttempt.
- #update(line) ⇒ Object
Constructor Details
#initialize ⇒ HandshakeAttempt
Returns a new instance of HandshakeAttempt.
7 8 9 10 |
# File 'lib/denko/connection/handshake.rb', line 7 def initialize @acknowledged = false @result = nil end |
Instance Attribute Details
#acknowledged ⇒ Object (readonly)
Returns the value of attribute acknowledged.
6 7 8 |
# File 'lib/denko/connection/handshake.rb', line 6 def acknowledged @acknowledged end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
6 7 8 |
# File 'lib/denko/connection/handshake.rb', line 6 def result @result end |
Instance Method Details
#update(line) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/denko/connection/handshake.rb', line 12 def update(line) if line.match(/\AACK:/) @result = line.split(":", 2)[1] @acknowledged = true end end |