Method: Toolshed::Timeout#initialize

Defined in:
lib/toolshed/timeout.rb

#initialize(options = nil) ⇒ Timeout

Returns a new instance of Timeout.



18
19
20
21
22
# File 'lib/toolshed/timeout.rb', line 18

def initialize(options = nil)
  options ||= {}
  @timeout_period = options[:timeout_period] || 30
  @start_time = options[:start_time] || Time.now.utc.to_i
end