Object
Represents the packet of data sent over the wire as JSON data, containing a message and a hash of arguments
# File lib/cucumber/wire_support/wire_packet.rb, line 17 def initialize(message, params = nil) @message, @params = message, params end
# File lib/cucumber/wire_support/wire_packet.rb, line 7 def parse(raw) attributes = JSON.parse(raw.strip) message = attributes[0] params = attributes[1] new(message, params) end
# File lib/cucumber/wire_support/wire_packet.rb, line 27 def handle_with(handler) handler.send("handle_#{@message}", @params) end
# File lib/cucumber/wire_support/wire_packet.rb, line 21 def to_json packet = [@message] packet << @params if @params packet.to_json end
[Validate]
Generated with the Darkfish Rdoc Generator 2.