Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'haml' # version 4.0.7
- template = <<EOF
- - if true
- %h1 {{SECTION_NO_1}}
- - if false
- %h1 {{SECTION_NO_2}}
- - if true
- %h1 {{SECTION_NO_3}}
- EOF
- engine = Haml::Engine.new(template)
- puts engine.render
- # output
- # <h1>{{SECTION_NO_1}}</h1>
- # <h1>{{SECTION_NO_3}}</h1>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement