# File lib/net/dns/resolver/timeouts.rb, line 30 def pretty_to_s transform(@seconds) end
Executes the method's block. If the block execution terminates before sec seconds has passed, it returns true. If not, it terminates the execution and raises Timeout::Error. If @seconds is 0 or nil, no timeout is set.
# File lib/net/dns/resolver/timeouts.rb, line 38 def timeout(&block) raise LocalJumpError, "no block given" unless block_given? Timeout.timeout(@seconds, &block) end
Generated with the Darkfish Rdoc Generator 2.