Module: Kramdown::Utils
- Defined in:
- lib/kramdown/utils.rb,
lib/kramdown/utils/html.rb,
lib/kramdown/utils/entities.rb,
lib/kramdown/utils/ordered_hash.rb
Overview
Utils Module
This module contains utility class/modules/methods that can be used by both parsers and converters.
Defined Under Namespace
Modules: Entities, Html Classes: OrderedHash
Class Method Summary collapse
-
.camelize(name) ⇒ Object
Treat
name
as if it were snake cased (e.g. snake_case) and camelize it (e.g. SnakeCase).
Class Method Details
.camelize(name) ⇒ Object
Treat name
as if it were snake cased (e.g. snake_case) and camelize it (e.g. SnakeCase).
36 37 38 |
# File 'lib/kramdown/utils.rb', line 36 def self.camelize(name) name.split('_').inject('') {|s,x| s << x[0..0].upcase + x[1..-1] } end |