module Asciidoctor::Katex::Utils

@private

Public Instance Methods

hash_camelize(hash) click to toggle source

@param hash [Hash] the hash to transform. @return [Hash] a copy of the hash with under_score keys transformed to camelCase.

# 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