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

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

#bObject (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