Module: JSObfu::Disable::ClassMethods

Defined in:
lib/jsobfu/disable.rb

Constant Summary

@@lock =

Set up some class variables for allowing specs

Mutex.new
@@disabled =
false

Instance Method Summary (collapse)

Instance Method Details

- (Object) disabled=(val)

Globally enable or disable obfuscation, useful for unit tests etc

Parameters:

  • val (Boolean)

    the global obfuscation state to set



13
14
15
# File 'lib/jsobfu/disable.rb', line 13

def disabled=(val)
  @@lock.synchronize { @@disabled = val }
end

- (Boolean) disabled?

Returns obfuscation is globally disabled

Returns:

  • (Boolean)

    obfuscation is globally disabled



18
19
20
# File 'lib/jsobfu/disable.rb', line 18

def disabled?
  @@disabled
end