lib/sslyze/xml.rb in ruby-sslyze-1.0.0 vs lib/sslyze/xml.rb in ruby-sslyze-1.1.0
- old
+ new
@@ -65,10 +65,12 @@
# @return [Integer]
#
# @since 1.0.0
#
def network_timeout
- @default_time ||= @doc.at_xpath('/document/results/@networkTimeout').value.to_i
+ @default_time ||= if (attr = @doc.at_xpath('/document/results/@networkTimeout'))
+ attr.value.to_i
+ end
end
#
# Duration of the scan.
#