Class: SocketIo::Packet::EventPacket
Constant Summary
PACKET_REGEX, PACKET_TYPES
Instance Attribute Summary
#ack, #data, #endpoint, #id
Instance Method Summary
collapse
#ackdata?, #initialize, #json, parse, parse_json
Instance Method Details
#args ⇒ Object
10
11
12
|
# File 'lib/socket.io/packet/event_packet.rb', line 10
def args
json['args'] || []
end
|
#name ⇒ Object
6
7
8
|
# File 'lib/socket.io/packet/event_packet.rb', line 6
def name
json['name']
end
|
#to_s ⇒ Object
16
17
18
19
20
21
22
23
24
|
# File 'lib/socket.io/packet/event_packet.rb', line 16
def to_s
ev = { 'name' => name }
if args && args.length
ev['args'] = args
end
super ev.to_json;
end
|
#type_id ⇒ Object
14
|
# File 'lib/socket.io/packet/event_packet.rb', line 14
def type_id; 5; end
|