Class: GryphonNest::Renderers::MustacheRenderer

Inherits:
Mustache
  • Object
show all
Defined in:
lib/gryphon_nest/renderers/mustache_renderer.rb

Overview

Class to override default Mustache behavior

Instance Method Summary collapse

Instance Method Details

#partial(_name) ⇒ String

Parameters:

  • _name (String)

Returns:

  • (String)


12
13
14
15
16
# File 'lib/gryphon_nest/renderers/mustache_renderer.rb', line 12

def partial(_name)
  name = @context[:yield]
  path = "#{template_path}/#{name}.#{template_extension}"
  File.read(path)
end