Module: Asciidoctor::Katex::Utils

Included in:
OpalKatexAdapter, RubyKatexAdapter
Defined in:
lib/asciidoctor/katex/utils.rb

Class Method Summary collapse

Class Method Details

.hash_camelize(hash) ⇒ Hash


11
12
13
14
15
16
# File 'lib/asciidoctor/katex/utils.rb', line 11

def hash_camelize(hash)
  hash.map { |key, val|
    key = key.to_s.gsub(/_\w/) { |s| s[1].upcase }.to_sym
    [key, val]
  }.to_h
end