Class: Haml::Escape

Inherits:
Temple::Filters::Escapable
  • Object
show all
Defined in:
lib/haml/escape.rb

Direct Known Subclasses

EscapeAny, ForceEscape

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Escape

Returns a new instance of Escape.



6
7
8
9
10
11
# File 'lib/haml/escape.rb', line 6

def initialize(opts = {})
  super
  @escape_code = options[:escape_code] ||
    "::Haml::Util.escape_html#{options[:use_html_safe] ? '_safe' : ''}((%s))"
  @escaper = eval("proc {|v| #{@escape_code % 'v'} }")
end