Class: Handlebars::Helpers::StringFormatting::Camel

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

Overview

camel case the characters in the given ‘string’.

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 camel case the characters in the given ‘string’.

Examples:


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

TheQuickBrownFox99

Returns:

  • (String)

    value converted to camel case



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

def parse(value)
  tokenizer.parse(value).underscore.camelize
end