Skip to content
Snippets Groups Projects
Commit aa690d22 authored by Tomasz Maczukin's avatar Tomasz Maczukin
Browse files

Fix 'use_threshold' usage inside of DNSXLCheck

parent ac9ec4fb
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -26,8 +26,12 @@ class DNSXLCheck
dnsxl_check
end
 
def initialize
@use_threshold = true
end
def test(ip)
if use_threshold?
if @use_threshold
test_with_threshold(ip)
else
test_strict(ip)
Loading
Loading
@@ -52,10 +56,6 @@ class DNSXLCheck
@use_threshold = value == true
end
 
def use_threshold?
@use_threshold &&= true
end
def threshold=(threshold)
raise ArgumentError, "'threshold' value must be grather than 0 and less than or equal to 1" unless threshold > 0 && threshold <= 1
@threshold = threshold
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment