summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest/dns.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2015-03-09 13:09:46 +0000
committerSteve Kemp <steve@steve.org.uk>2015-03-09 13:09:46 +0000
commitedf0e675123e4869e2739d1bab0ed57b3b9f664c (patch)
treec0771fecb0734fb342cf16e352f19fd3ead9a112 /lib/custodian/protocoltest/dns.rb
parent22b40326730fb7a4a8e2f5cb8d877f6a84494d02 (diff)
Do not use parentheses for method calls with no arguments.
This is neater. Flagged by rubocop
Diffstat (limited to 'lib/custodian/protocoltest/dns.rb')
-rw-r--r--lib/custodian/protocoltest/dns.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/custodian/protocoltest/dns.rb b/lib/custodian/protocoltest/dns.rb
index 05c8534..5787881 100644
--- a/lib/custodian/protocoltest/dns.rb
+++ b/lib/custodian/protocoltest/dns.rb
@@ -100,8 +100,8 @@ module Custodian
#
# Get the timeout period.
#
- settings = Custodian::Settings.instance()
- period = settings.timeout()
+ settings = Custodian::Settings.instance
+ period = settings.timeout
#
# Do the lookup
@@ -147,16 +147,16 @@ module Custodian
case ltype
when /^A$/ then
- dns.getresources(name, Resolv::DNS::Resource::IN::A).map{ |r| results.push( r.address.to_s() ) }
+ dns.getresources(name, Resolv::DNS::Resource::IN::A).map{ |r| results.push( r.address.to_s ) }
when /^AAAA$/ then
- dns.getresources(name, Resolv::DNS::Resource::IN::AAAA).map{ |r| results.push( r.address.to_s() ) }
+ dns.getresources(name, Resolv::DNS::Resource::IN::AAAA).map{ |r| results.push( r.address.to_s ) }
when /^NS$/ then
- dns.getresources(name, Resolv::DNS::Resource::IN::NS).map{ |r| results.push( Resolv.getaddresses( r.name.to_s() ) ) }
+ dns.getresources(name, Resolv::DNS::Resource::IN::NS).map{ |r| results.push( Resolv.getaddresses( r.name.to_s ) ) }
when /^MX$/ then
- dns.getresources(name, Resolv::DNS::Resource::IN::MX).map{ |r| results.push( Resolv.getaddresses( r.exchange.to_s() ) ) }
+ dns.getresources(name, Resolv::DNS::Resource::IN::MX).map{ |r| results.push( Resolv.getaddresses( r.exchange.to_s ) ) }
else
@error = "Unknown record type to resolve: '#{ltype}'"