class Handlebars::Helpers::Misc::Safe

Safe will return the value with <> and single and double quotes left as is

Public Instance Methods

handlebars_helper() click to toggle source
# File lib/handlebars/helpers/misc/safe.rb, line 29
def handlebars_helper
  proc do |_context, value|
    wrapper(parse(value))
  end
end
parse(value) click to toggle source

Parse will return the value with <> and single and double quotes left as is

@example

puts Safe.new.parse('<hello>')

<hello>

@param [String] value that is considered a safe string @return [String] value in safe string format

# File lib/handlebars/helpers/misc/safe.rb, line 24
def parse(value)
  value = '' if value.nil?
  value
end