Class: DEBUGGER__::UI_CDP::WebSocketUtils::Frame
- Defined in:
- lib/debug/server_cdp.rb
Instance Attribute Summary collapse
-
#b ⇒ Object
readonly
Returns the value of attribute b.
Instance Method Summary collapse
- #<<(obj) ⇒ Object
- #char(bytes) ⇒ Object
-
#initialize ⇒ Frame
constructor
A new instance of Frame.
- #uint16(bytes) ⇒ Object
- #ulonglong(bytes) ⇒ Object
Constructor Details
#initialize ⇒ Frame
Returns a new instance of Frame.
251 252 253 |
# File 'lib/debug/server_cdp.rb', line 251 def initialize @b = ''.b end |
Instance Attribute Details
#b ⇒ Object (readonly)
Returns the value of attribute b.
249 250 251 |
# File 'lib/debug/server_cdp.rb', line 249 def b @b end |
Instance Method Details
#<<(obj) ⇒ Object
255 256 257 258 259 260 261 262 |
# File 'lib/debug/server_cdp.rb', line 255 def << obj case obj when String @b << obj.b when Enumerable obj.each{|e| self << e} end end |
#char(bytes) ⇒ Object
264 265 266 |
# File 'lib/debug/server_cdp.rb', line 264 def char bytes @b << bytes end |
#uint16(bytes) ⇒ Object
272 273 274 |
# File 'lib/debug/server_cdp.rb', line 272 def uint16 bytes @b << [bytes].pack('n*') end |
#ulonglong(bytes) ⇒ Object
268 269 270 |
# File 'lib/debug/server_cdp.rb', line 268 def ulonglong bytes @b << [bytes].pack('Q>') end |