Class: Handlebars::Helpers::StringFormatting::Downcase

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

Overview

Downcase/Lowercase all of 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 Downcase/Lowercase all of the characters in the given string.

Examples:


puts Downcase.new.parse('The Quick Brown Fox 99')

the quick brown fox 99

Returns:

  • (String)

    value in lowercase



23
24
25
26
27
# File 'lib/handlebars/helpers/string_formatting/downcase.rb', line 23

def parse(value)
  return '' if value.nil?

  value.downcase
end