Class: Handlebars::Helpers::StringFormatting::Dasherize

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

Overview

convert to dash notation

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 convert to dash notation

Examples:


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

the-quick-brown-fox99

Returns:

  • value converted to dash notation



27
28
29
# File 'lib/handlebars/helpers/string_formatting/dasherize.rb', line 27

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