Class: Latexmath::Symbol

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/latexmath/symbol.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.get(symbol) ⇒ Object



6
7
8
# File 'lib/latexmath/symbol.rb', line 6

def self.get(symbol)
  instance.symbols[symbol]
end

Instance Method Details

#symbolsObject



10
11
12
13
14
15
16
17
18
# File 'lib/latexmath/symbol.rb', line 10

def symbols
  if RUBY_ENGINE == 'opal'
    require 'unimathsymbols'
    require 'native'
    @symbols ||= Native::Object.new(`globalThis.unimathsymbols`)
  else
    @symbols ||= Latexmath::Constants::SYMBOLS
  end
end