diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:19:47 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:19:47 +0000 |
commit | e716a49dabe2c086a97e2d8b3cffe5cf369ad026 (patch) | |
tree | e7e98125f89941db4c9d0f48f2df9c410467a3d8 /lib/custodian/testfactory.rb | |
parent | af2ee063abea8235a8cbd1448533e4f4fbc0d0af (diff) |
Removed spaces inside parenthesis.
Diffstat (limited to 'lib/custodian/testfactory.rb')
-rw-r--r-- | lib/custodian/testfactory.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/custodian/testfactory.rb b/lib/custodian/testfactory.rb index 7383ca2..b28d30a 100644 --- a/lib/custodian/testfactory.rb +++ b/lib/custodian/testfactory.rb @@ -28,7 +28,7 @@ module Custodian # # The line will be like "target must run tcp|ssh|ftp|smtp .." # - def self.create( line ) + def self.create(line) raise ArgumentError, 'The type of test to create cannot be nil' if line.nil? @@ -46,7 +46,7 @@ module Custodian if line =~ /must\s+(not\s+)?run\s+(\S+)(\s+|\.|$)/ test_type = $2.dup - test_type.chomp!( '.' ) + test_type.chomp!('.') if @@subclasses[test_type].nil? raise ArgumentError, "There is no handler registered for the '#{test_type}' test-type" @@ -59,7 +59,7 @@ module Custodian @@subclasses[test_type].each do |impl| if impl - obj = impl.new( line ) + obj = impl.new(line) # # Get the notification text, which is not specific to the test-type @@ -67,7 +67,7 @@ module Custodian # We do this only after we've instantiated the test. # if line =~ /\s+otherwise\s+'([^']+)'/ - obj.set_notification_text( $1.dup ) + obj.set_notification_text($1.dup) end result.push(obj) @@ -77,7 +77,7 @@ module Custodian end # return the test-types. - return( result ) + return(result) else raise "Failed to instantiate a suitable protocol-test for '#{line}'" @@ -113,7 +113,7 @@ module Custodian # for each handler .. @@subclasses[name].each do |impl| - if ( impl == self.class ) + if (impl == self.class) return name end end @@ -145,7 +145,7 @@ module Custodian # # Set the user-text which is returned on error. # - def set_notification_text( str ) + def set_notification_text(str) @notification_text = str end |