summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest/rsync.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-21 23:34:23 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-21 23:34:23 +0000
commit31fdb85b20719eb2dab4d6e3cfea721e6c58ac08 (patch)
tree430e54909f8969f26670c7e8873696ae2666bd80 /lib/custodian/protocoltest/rsync.rb
parent7d153d8f22fc767108103cd8fdfc056e2656b914 (diff)
Serialize and cosntruct neatly
Diffstat (limited to 'lib/custodian/protocoltest/rsync.rb')
-rw-r--r--lib/custodian/protocoltest/rsync.rb17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/custodian/protocoltest/rsync.rb b/lib/custodian/protocoltest/rsync.rb
index c35758e..c8a2095 100644
--- a/lib/custodian/protocoltest/rsync.rb
+++ b/lib/custodian/protocoltest/rsync.rb
@@ -11,6 +11,11 @@
#
class RSYNCTest < TCPTest
+ #
+ # The line from which we were constructed.
+ #
+ attr_reader :line
+
#
# The host to test against.
@@ -30,6 +35,12 @@ class RSYNCTest < TCPTest
# Constructor
#
def initialize( line )
+
+ #
+ # Save the line.
+ #
+ @line = line
+
#
# Save the host
#
@@ -62,11 +73,7 @@ class RSYNCTest < TCPTest
# Convert this class to JSON such that it may be serialized.
#
def to_json
- hash = {
- :test_type => 'rsync',
- :test_target => @host,
- :test_port => @port,
- }
+ hash = { :line => @line }
hash.to_json
end