Class: Handlebars::Helpers::StringFormatting::Lamel

Inherits:
BaseHelper
  • Object
show all
Defined in:
lib/handlebars/helpers/string_formatting/lamel.rb

Overview

lamel case is the same as camel case except with the first character as lower case

Instance Method Summary collapse

Methods inherited from BaseHelper

#handlebars_helper, #parse_json, #struct_to_hash, #tokenizer, #wrapper

Instance Method Details

#parse(value) ⇒ String

Parse will lamel case is the same as camel case except with the first character as lower case

Examples:


puts Lamel.new.parse('the quick brown fox 99')

theQuickBrownFox99

Returns:

  • (String)

    value converted to lamel case



23
24
25
# File 'lib/handlebars/helpers/string_formatting/lamel.rb', line 23

def parse(value)
  tokenizer.parse(value, separator: '_').camelize(:lower)
end