Class: Thread

Inherits:
Object show all
Defined in:
lib/resugan/thread.rb

Instance Method Summary collapse

Instance Method Details

#pop_resugan_contextObject



11
12
13
# File 'lib/resugan/thread.rb', line 11

def pop_resugan_context
  @resugan_context = @resugan_context_stack.pop
end

#push_resugan_context(namespace = '') ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/resugan/thread.rb', line 2

def push_resugan_context(namespace = '')
  if !@resugan_context
    @resugan_context_stack = []
  end

  @resugan_context = Resugan::Context.new(namespace)
  @resugan_context_stack << @resugan_context
end

#resugan_contextObject



15
16
17
# File 'lib/resugan/thread.rb', line 15

def resugan_context
  @resugan_context
end