Class: Handlebars::SafeString

Inherits:
Object
  • Object
show all
Defined in:
lib/handlebars/safe_string.rb

Class Method Summary collapse

Class Method Details

.new(string) ⇒ Object


3
4
5
6
7
8
9
# File 'lib/handlebars/safe_string.rb', line 3

def self.new(string)
  if context = Context.current
    context.handlebars['SafeString'].new(string)
  else
    fail "Cannot instantiate Handlebars.SafeString outside a running template Evaluation"
  end
end