From 31fdb85b20719eb2dab4d6e3cfea721e6c58ac08 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Wed, 21 Nov 2012 23:34:23 +0000 Subject: Serialize and cosntruct neatly --- lib/custodian/protocoltest/jabber.rb | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'lib/custodian/protocoltest/jabber.rb') diff --git a/lib/custodian/protocoltest/jabber.rb b/lib/custodian/protocoltest/jabber.rb index 1aef8b5..da400ac 100644 --- a/lib/custodian/protocoltest/jabber.rb +++ b/lib/custodian/protocoltest/jabber.rb @@ -11,6 +11,11 @@ # class JABBERTest < TCPTest + # + # The line from which we were constructed. + # + attr_reader :line + # # The host to test against. @@ -29,6 +34,12 @@ class JABBERTest < TCPTest # Constructor # def initialize( line ) + + # + # Save the line + # + @line = line + # # Save the host # @@ -61,11 +72,7 @@ class JABBERTest < TCPTest # Convert this class to JSON such that it may be serialized. # def to_json - hash = { - :test_type => 'jabber', - :test_target => @host, - :test_port => @port, - } + hash = { :line => @line } hash.to_json end -- cgit v1.2.1