Class: Haml::Escape
- Inherits:
-
Temple::Filters::Escapable
- Object
- Temple::Filters::Escapable
- Haml::Escape
- Defined in:
- lib/haml/escape.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Escape
constructor
A new instance of Escape.
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
|