Class: Handlebars::Helpers::StringFormatting::Pluserize

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

Overview

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

Examples:


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

the+quick+brown+fox99

Returns:

  • (String)

    value converted to plus notation



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

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