class Makanai::TemplateEngine::Haml

Attributes

locals[R]
text[R]

Public Class Methods

new(text:, locals: {}) click to toggle source
Calls superclass method
# File lib/makanai/template_engine/haml.rb, line 9
def initialize(text:, locals: {})
  super()
  @text = text
  @locals = locals
end

Public Instance Methods

result() click to toggle source
# File lib/makanai/template_engine/haml.rb, line 17
def result
  # ref: http://haml.info/docs/yardoc/Haml/Engine.html#render-instance_method
  ::Haml::Engine.new(text).render(Object.new, locals)
end