Module: Thoth::Context

Included in:
Thoth
Defined in:
lib/thoth/context.rb

Constant Summary collapse

KEY =
:thoth_context

Instance Method Summary collapse

Instance Method Details

#clear_context!Object



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

def clear_context!
  self.context = {}
end

#contextObject



8
9
10
# File 'lib/thoth/context.rb', line 8

def context
  RequestStore.store[KEY] ||= {}
end

#context=(value) ⇒ Object



12
13
14
# File 'lib/thoth/context.rb', line 12

def context=(value)
  RequestStore.store[KEY] = value
end