Module: Deface::HamlCompilerMethods

Included in:
HamlConverter, Deface::HamlConverter::Compiler
Defined in:
lib/deface/haml_converter.rb

Instance Method Summary collapse

Instance Method Details

#push_script(text, preserve_script, in_tag = false, preserve_tag = false, escape_html = false, nuke_inner_whitespace = false) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/deface/haml_converter.rb', line 4

def push_script(text, preserve_script, in_tag = false, preserve_tag = false,
                escape_html = false, nuke_inner_whitespace = false)
  push_text "<%= #{text.strip} %>"

  if block_given?
    yield
    push_silent('end')
  end
end

#push_silent(text, can_suppress = false) ⇒ Object



14
15
16
# File 'lib/deface/haml_converter.rb', line 14

def push_silent(text, can_suppress = false)
  push_text "<% #{text.strip} %>"
end