Fixes an issue with --cache-ttl being a Strig instead of an integer

This commit is contained in:
erwanlr
2015-11-26 13:52:12 +00:00
parent e27ef40e0f
commit 0ae6ef59ec

View File

@@ -3,8 +3,8 @@
class Browser
module Options
attr_accessor :cache_ttl, :request_timeout, :connect_timeout
attr_reader :basic_auth, :proxy, :proxy_auth, :throttle
attr_accessor :request_timeout, :connect_timeout
attr_reader :basic_auth, :cache_ttl, :proxy, :proxy_auth, :throttle
attr_writer :user_agent
# Sets the Basic Authentification credentials
@@ -25,6 +25,10 @@ class Browser
end
end
def cache_ttl=(ttl)
@cache_ttl = ttl.to_i
end
# @return [ Integer ]
def max_threads
@max_threads || 1