class Fiber

Public Instance Methods

[](key) click to toggle source

Attribute Reference–Returns the value of a fiber-local variable, using either a symbol or a string name. If the specified variable does not exist, returns nil.

# File lib/vendor/fiber_pool.rb, line 12
def [](key)
  local_fiber_variables[key]
end
[]=(key,value) click to toggle source

Attribute Assignment–Sets or creates the value of a fiber-local variable, using either a symbol or a string. See also Fiber#[].

# File lib/vendor/fiber_pool.rb, line 18
def []=(key,value)
  local_fiber_variables[key] = value
end

Protected Instance Methods

local_fiber_variables() click to toggle source
# File lib/vendor/fiber_pool.rb, line 24
def local_fiber_variables
  @local_fiber_variables ||= {}
end