Class: ReportsMash::Engine::ThreadState
- Inherits:
-
Object
- Object
- ReportsMash::Engine::ThreadState
- Defined in:
- lib/reportsmash/engine/thread_state.rb
Instance Attribute Summary collapse
-
#transaction ⇒ Object
Returns the value of attribute transaction.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ ThreadState
constructor
A new instance of ThreadState.
Constructor Details
#initialize ⇒ ThreadState
Returns a new instance of ThreadState.
5 6 7 |
# File 'lib/reportsmash/engine/thread_state.rb', line 5 def initialize @transaction = nil end |
Instance Attribute Details
#transaction ⇒ Object
Returns the value of attribute transaction.
4 5 6 |
# File 'lib/reportsmash/engine/thread_state.rb', line 4 def transaction @transaction end |
Class Method Details
.clear ⇒ Object
13 14 15 |
# File 'lib/reportsmash/engine/thread_state.rb', line 13 def self.clear Thread.current[:reportsmash_state] = nil end |
.get_current_state ⇒ Object
9 10 11 |
# File 'lib/reportsmash/engine/thread_state.rb', line 9 def self.get_current_state Thread.current[:reportsmash_state] ||= ThreadState.new end |