class Haml::HTML

Constants

DEPRECATED_FORMATS

Public Class Methods

new(opts = {}) click to toggle source
Calls superclass method
# File lib/haml/html.rb, line 6
def initialize(opts = {})
  if DEPRECATED_FORMATS.include?(opts[:format])
    opts = opts.dup
    opts[:format] = :html
  end
  super(opts)
end

Public Instance Methods

on_html_condcomment(condition, content, revealed = false) click to toggle source

This dispatcher supports Haml’s “revealed” conditional comment.

# File lib/haml/html.rb, line 15
def on_html_condcomment(condition, content, revealed = false)
  on_html_comment [:multi,
                   [:static, "[#{condition}]>#{'<!-->' if revealed}"],
                   content,
                   [:static, "#{'<!--' if revealed}<![endif]"]]
end