Class: Hyraft::Compiler::JavaScriptLibrary

Inherits:
Object
  • Object
show all
Defined in:
lib/hyraft/compiler/javascript_library.rb

Constant Summary collapse

CLEAN_LIBRARIES =
{}

Class Method Summary collapse

Class Method Details

.available_librariesObject



12
13
14
# File 'lib/hyraft/compiler/javascript_library.rb', line 12

def self.available_libraries
  CLEAN_LIBRARIES.keys
end

.get(library_name, obfuscation_method: :multi_layer) ⇒ Object



8
9
10
# File 'lib/hyraft/compiler/javascript_library.rb', line 8

def self.get(library_name, obfuscation_method: :multi_layer)
  CLEAN_LIBRARIES[library_name]
end

.register(library_name, javascript_code) ⇒ Object

Register external libraries (like elevhyra)



17
18
19
# File 'lib/hyraft/compiler/javascript_library.rb', line 17

def self.register(library_name, javascript_code)
  CLEAN_LIBRARIES[library_name] = javascript_code
end