diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-21 23:15:44 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-21 23:15:44 +0000 |
commit | b7608cc947bcca078644516a288a6bef67f7f09a (patch) | |
tree | f56a9b3b97fb623d836d70363f84f913f1584011 /lib/custodian/protocoltest/ftp.rb | |
parent | 964d16d5f573b5a4c1571a1e1a52789f0cee565e (diff) |
Added .to_json method to serialize our tests.
Diffstat (limited to 'lib/custodian/protocoltest/ftp.rb')
-rw-r--r-- | lib/custodian/protocoltest/ftp.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/custodian/protocoltest/ftp.rb b/lib/custodian/protocoltest/ftp.rb index 8894de0..1d60e43 100644 --- a/lib/custodian/protocoltest/ftp.rb +++ b/lib/custodian/protocoltest/ftp.rb @@ -59,6 +59,20 @@ class FTPTest < TCPTest # + # Convert this class to JSON such that it may be serialized. + # + def to_json + hash = { + :test_type => 'ftp', + :test_target => @host, + :test_port => @port, + } + hash.to_json + end + + + + # Run the TCP-protocol test. # def run_test |