Class: Handlebars::Helpers::StringFormatting::DoubleColon

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

Overview

double_colon notation for the characters in the given ‘string’. aka ruby namespace

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 double_colon notation for the characters in the given ‘string’. aka ruby namespace

Examples:


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

The::Quick::Brown::Fox99

Returns:

  • (String)

    value converted to double_colon notation



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

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