class Handlebars::Helpers::StringFormatting::Humanize

humanize wil convert text to human case, aka capitalize

Public Instance Methods

parse(value) click to toggle source

Parse will humanize wil convert text to human case, aka capitalize

@side effects

Text casing set to upper case for first letter only.
Numbers will maintain their spacing

@example

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

The quick brown fox 99

@return [String] value converted to sentence case

# File lib/handlebars/helpers/string_formatting/humanize.rb, line 28
def parse(value)
  tokenizer.parse(value,
                  separator: ' ',
                  preserve_case: true,
                  compress_prefix_numerals: false,
                  compress_suffix_numerals: false)
           .humanize
end