Class: Handlebars::Helpers::StringFormatting::Upcase

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

Overview

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

Examples:


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

THE QUICK BROWN FOX 99

Returns:

  • (String)

    value in uppercase



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

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

  value.upcase
end