Class: DEBUGGER__::UI_CDP::WebSocketUtils::Frame

Inherits:
Object
  • Object
show all
Defined in:
lib/debug/server_cdp.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeFrame



253
254
255
# File 'lib/debug/server_cdp.rb', line 253

def initialize
  @b = ''.b
end

Instance Attribute Details

#bObject (readonly)

Returns the value of attribute b.



251
252
253
# File 'lib/debug/server_cdp.rb', line 251

def b
  @b
end

Instance Method Details

#<<(obj) ⇒ Object



257
258
259
260
261
262
263
264
# File 'lib/debug/server_cdp.rb', line 257

def << obj
  case obj
  when String
    @b << obj.b
  when Enumerable
    obj.each{|e| self << e}
  end
end

#char(bytes) ⇒ Object



266
267
268
# File 'lib/debug/server_cdp.rb', line 266

def char bytes
  @b << bytes
end

#uint16(bytes) ⇒ Object



274
275
276
# File 'lib/debug/server_cdp.rb', line 274

def uint16 bytes
  @b << [bytes].pack('n*')
end

#ulonglong(bytes) ⇒ Object



270
271
272
# File 'lib/debug/server_cdp.rb', line 270

def ulonglong bytes
  @b << [bytes].pack('Q>')
end