Class: Diecut::Mustache

Inherits:
Mustache
  • Object
show all
Defined in:
lib/diecut/mustache.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#partials_hashObject

Returns the value of attribute partials_hash.



4
5
6
# File 'lib/diecut/mustache.rb', line 4

def partials_hash
  @partials_hash
end

Instance Method Details

#escapeHTML(str) ⇒ Object

Diecut’s templates aren’t HTML files - if they need escaping it should happen in the source file



16
17
18
# File 'lib/diecut/mustache.rb', line 16

def escapeHTML(str)
  str
end

#partial(name) ⇒ Object



6
7
8
# File 'lib/diecut/mustache.rb', line 6

def partial(name)
  partials_hash.fetch(name).template_string
end

#raise_on_context_miss?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/diecut/mustache.rb', line 10

def raise_on_context_miss?
  true
end