Class: Pitchfork::HttpServer::TimeoutHandler::Info
- Inherits:
-
Object
- Object
- Pitchfork::HttpServer::TimeoutHandler::Info
- Defined in:
- lib/pitchfork/http_server.rb
Instance Attribute Summary collapse
-
#rack_env ⇒ Object
readonly
Returns the value of attribute rack_env.
-
#thread ⇒ Object
readonly
Returns the value of attribute thread.
Instance Method Summary collapse
- #copy_thread_variables! ⇒ Object
-
#initialize(thread, rack_env) ⇒ Info
constructor
A new instance of Info.
Constructor Details
#initialize(thread, rack_env) ⇒ Info
Returns a new instance of Info.
21 22 23 24 |
# File 'lib/pitchfork/http_server.rb', line 21 def initialize(thread, rack_env) @thread = thread @rack_env = rack_env end |
Instance Attribute Details
#rack_env ⇒ Object (readonly)
Returns the value of attribute rack_env.
19 20 21 |
# File 'lib/pitchfork/http_server.rb', line 19 def rack_env @rack_env end |
#thread ⇒ Object (readonly)
Returns the value of attribute thread.
19 20 21 |
# File 'lib/pitchfork/http_server.rb', line 19 def thread @thread end |
Instance Method Details
#copy_thread_variables! ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/pitchfork/http_server.rb', line 26 def copy_thread_variables! current_thread = Thread.current @thread.keys.each do |key| current_thread[key] = @thread[key] end @thread.thread_variables.each do |variable| current_thread.thread_variable_set(variable, @thread.thread_variable_get(variable)) end end |