Class: WebSocketClient::TextFrame
- Inherits:
-
Object
- Object
- WebSocketClient::TextFrame
- Defined in:
- lib/websocket_client/frame_io.rb
Instance Attribute Summary collapse
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
- #bytes ⇒ Object
-
#initialize(text) ⇒ TextFrame
constructor
A new instance of TextFrame.
- #type ⇒ Object
Constructor Details
#initialize(text) ⇒ TextFrame
Returns a new instance of TextFrame.
11 12 13 |
# File 'lib/websocket_client/frame_io.rb', line 11 def initialize(text) @text = text end |
Instance Attribute Details
#text ⇒ Object
Returns the value of attribute text.
9 10 11 |
# File 'lib/websocket_client/frame_io.rb', line 9 def text @text end |
Instance Method Details
#bytes ⇒ Object
19 20 21 |
# File 'lib/websocket_client/frame_io.rb', line 19 def bytes [ 0x00, @text.bytes.to_a, 0xFF ].flatten end |
#type ⇒ Object
15 16 17 |
# File 'lib/websocket_client/frame_io.rb', line 15 def type :text end |