Class: Handlebars::Helpers::StringFormatting::Dotirize

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

Overview

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

Examples:


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

the.quick.brown.fox99

Returns:

  • (String)

    value converted to dot notation



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

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