Class: WebSocket::Handshake::Handler::Base
- Inherits:
-
Object
- Object
- WebSocket::Handshake::Handler::Base
- Defined in:
- lib/websocket/handshake/handler/base.rb
Overview
This class and it’s descendants are included in client or server handshake in order to extend basic functionality
Instance Method Summary collapse
-
#initialize(handshake) ⇒ Base
constructor
A new instance of Base.
- #to_s ⇒ Object
- #valid? ⇒ Boolean
Constructor Details
#initialize(handshake) ⇒ Base
Returns a new instance of Base.
8 9 10 |
# File 'lib/websocket/handshake/handler/base.rb', line 8 def initialize(handshake) @handshake = handshake end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/websocket/handshake/handler/base.rb', line 13 def to_s result = [header_line] handshake_keys.each do |key| result << key.join(': ') end result << '' result << finishing_line result.join("\r\n") end |
#valid? ⇒ Boolean
23 24 25 |
# File 'lib/websocket/handshake/handler/base.rb', line 23 def valid? true end |