Class: Templette::Engines::Haml

Inherits:
Object
  • Object
show all
Defined in:
lib/templette/engines/haml.rb

Instance Method Summary collapse

Instance Method Details

#render(html, the_binding) ⇒ Object



7
8
9
# File 'lib/templette/engines/haml.rb', line 7

def render(html, the_binding)
  with_no_warnings { ::Haml::Engine.new(html).render(the_binding) }
end

#with_no_warningsObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/templette/engines/haml.rb', line 12

def with_no_warnings
  save = $-w
  $-w = false

  begin
    yield
  ensure
    $-w = save
  end
end