Class: Rack::DevInsight::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/dev_insight/context.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



16
17
18
# File 'lib/rack/dev_insight/context.rb', line 16

def id
  @id
end

#resultObject (readonly)

Returns the value of attribute result.



16
17
18
# File 'lib/rack/dev_insight/context.rb', line 16

def result
  @result
end

Class Method Details

.create_current(id) ⇒ Object



11
12
13
# File 'lib/rack/dev_insight/context.rb', line 11

def create_current(id)
  Thread.current[:rack_dev_insight_context] = new(id)
end

.currentObject



7
8
9
# File 'lib/rack/dev_insight/context.rb', line 7

def current
  Thread.current[:rack_dev_insight_context]
end