Class: SimpleTimeout::Control
- Inherits:
-
Object
- Object
- SimpleTimeout::Control
- Defined in:
- lib/simple_timeout.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
Returns the value of attribute error.
-
#mutex ⇒ Object
Returns the value of attribute mutex.
-
#result ⇒ Object
Returns the value of attribute result.
-
#status ⇒ Object
Returns the value of attribute status.
-
#timeout_error_class ⇒ Object
Returns the value of attribute timeout_error_class.
-
#timeout_in_seconds ⇒ Object
Returns the value of attribute timeout_in_seconds.
Instance Method Summary collapse
-
#initialize(timeout_in_seconds, timeout_error_class) ⇒ Control
constructor
A new instance of Control.
Constructor Details
#initialize(timeout_in_seconds, timeout_error_class) ⇒ Control
Returns a new instance of Control.
38 39 40 41 42 43 44 45 |
# File 'lib/simple_timeout.rb', line 38 def initialize(timeout_in_seconds,timeout_error_class) self.timeout_in_seconds = timeout_in_seconds self.timeout_error_class = timeout_error_class self.status = :waiting self.mutex = Mutex.new self.result = nil self.error = nil end |
Instance Attribute Details
#error ⇒ Object
Returns the value of attribute error.
37 38 39 |
# File 'lib/simple_timeout.rb', line 37 def error @error end |
#mutex ⇒ Object
Returns the value of attribute mutex.
37 38 39 |
# File 'lib/simple_timeout.rb', line 37 def mutex @mutex end |
#result ⇒ Object
Returns the value of attribute result.
37 38 39 |
# File 'lib/simple_timeout.rb', line 37 def result @result end |
#status ⇒ Object
Returns the value of attribute status.
37 38 39 |
# File 'lib/simple_timeout.rb', line 37 def status @status end |
#timeout_error_class ⇒ Object
Returns the value of attribute timeout_error_class.
37 38 39 |
# File 'lib/simple_timeout.rb', line 37 def timeout_error_class @timeout_error_class end |
#timeout_in_seconds ⇒ Object
Returns the value of attribute timeout_in_seconds.
37 38 39 |
# File 'lib/simple_timeout.rb', line 37 def timeout_in_seconds @timeout_in_seconds end |