Module: WebSocket::NiceInspect

Included in:
Frame::Base, Handshake::Base
Defined in:
lib/websocket/nice_inspect.rb

Instance Method Summary collapse

Instance Method Details

#inspectObject

Recreate inspect as #to_s will be overwritten



6
7
8
9
10
# File 'lib/websocket/nice_inspect.rb', line 6

def inspect
  vars = instance_variables.map { |v| "#{v}=#{instance_variable_get(v).inspect}" }.join(', ')
  insp = Kernel.format("#{self.class}:0x%08x", __id__)
  "<#{insp} #{vars}>"
end