class Typhoeus::EasyFactory
def sanitize(options)
Experimental RBS support (using type sampling data from the type_fusion
project).
def sanitize: (Hash options) -> Hash
This signature was generated using 42 samples from 3 applications.
def sanitize(options) # set nosignal to true by default # this improves thread safety and timeout behavior sanitized = {:nosignal => true} options.each do |k,v| s = k.to_sym next if SANITIZE_IGNORE.include?(s) if new_option = RENAMED_OPTIONS[k.to_sym] warn("Deprecated option #{k}. Please use #{new_option} instead.") sanitized[new_option] = v # sanitize timeouts elsif SANITIZE_TIMEOUT.include?(s) if !v.integer? warn("Value '#{v}' for option '#{k}' must be integer.") end sanitized[k] = v.ceil else sanitized[k] = v end end sanitize_timeout!(sanitized, :timeout) sanitize_timeout!(sanitized, :connecttimeout) sanitized end