diff options
author | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:04:45 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2015-03-09 13:04:45 +0000 |
commit | 7bde57ae8fce8ce55a44cc31727bfc08f2369fe9 (patch) | |
tree | 8301bdccddd2af69b9ce7c633cefa3c6d00424fb | |
parent | 35c41ad2b34de38a4cfac11911bf6de09f60e419 (diff) |
Omit the parentheses in defs when the method doesn't accept any arguments.
This is neater.
-rw-r--r-- | lib/custodian/alerts/mauve.rb | 2 | ||||
-rw-r--r-- | lib/custodian/parser.rb | 2 | ||||
-rw-r--r-- | lib/custodian/queue.rb | 2 | ||||
-rwxr-xr-x | t/test-custodian-util-timespan.rb | 2 | ||||
-rwxr-xr-x | t/test-ldap-probe.rb | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/lib/custodian/alerts/mauve.rb b/lib/custodian/alerts/mauve.rb index 79a1416..8ce14c1 100644 --- a/lib/custodian/alerts/mauve.rb +++ b/lib/custodian/alerts/mauve.rb @@ -60,7 +60,7 @@ module Custodian # # Generate an alert-message which will be raised via mauve. # - def raise() + def raise return unless( @loaded ) diff --git a/lib/custodian/parser.rb b/lib/custodian/parser.rb index 3379c5a..e73001f 100644 --- a/lib/custodian/parser.rb +++ b/lib/custodian/parser.rb @@ -52,7 +52,7 @@ module Custodian # # Constructor # - def initialize( ) + def initialize @MACROS = Hash.new() @jobs = Array.new() end diff --git a/lib/custodian/queue.rb b/lib/custodian/queue.rb index e8cfb8a..6e252e9 100644 --- a/lib/custodian/queue.rb +++ b/lib/custodian/queue.rb @@ -62,7 +62,7 @@ module Custodian # # Empty the queue # - def flush!() + def flush! raise "Subclasses must implement this method!" end end diff --git a/t/test-custodian-util-timespan.rb b/t/test-custodian-util-timespan.rb index 881f5a5..ef05fe7 100755 --- a/t/test-custodian-util-timespan.rb +++ b/t/test-custodian-util-timespan.rb @@ -200,7 +200,7 @@ class TestTimeSpanUtil < Test::Unit::TestCase # period is the worst case. # # - def test_worst() + def test_worst for i in 0..23 assert( Custodian::Util::TimeSpan.inside?( 0, 23, i ) ) end diff --git a/t/test-ldap-probe.rb b/t/test-ldap-probe.rb index 9d6b6f0..5273b31 100755 --- a/t/test-ldap-probe.rb +++ b/t/test-ldap-probe.rb @@ -42,7 +42,7 @@ class TestLDAPProbe < Test::Unit::TestCase # # Ensure missing a test raises an error. # - def test_missing_ldap() + def test_missing_ldap # # test data # |