Method: Moped::Threaded#stack

Defined in:
lib/moped/threaded.rb

#stack(name) ⇒ Array

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Get the named stack.

Examples:

Get a stack by name

Threaded.stack(:create)

Parameters:

  • name (Symbol)

    The name of the stack

Returns:

Since:

  • 1.0.0



64
65
66
67
# File 'lib/moped/threaded.rb', line 64

def stack(name)
  stacks = (Thread.current[:__moped_threaded_stacks__] ||= {})
  stacks[name] ||= []
end