Class: Esse::AsyncIndexing::Testing

Inherits:
Object
  • Object
show all
Defined in:
lib/esse/async_indexing/testing.rb

Class Method Summary collapse

Class Method Details

.disable!Object



11
12
13
# File 'lib/esse/async_indexing/testing.rb', line 11

def disable!
  Thread.current[:esse_async_indexing_testing] = false
end

.disabled?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/esse/async_indexing/testing.rb', line 19

def disabled?
  !enabled?
end

.enable!Object



7
8
9
# File 'lib/esse/async_indexing/testing.rb', line 7

def enable!
  Thread.current[:esse_async_indexing_testing] = true
end

.enabled?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/esse/async_indexing/testing.rb', line 15

def enabled?
  Thread.current[:esse_async_indexing_testing] == true
end