Class: Haml::Escapable
- Inherits:
-
Temple::Filters::Escapable
- Object
- Temple::Filters::Escapable
- Haml::Escapable
- Defined in:
- lib/haml/escapable.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Escapable
constructor
A new instance of Escapable.
Constructor Details
#initialize(opts = {}) ⇒ Escapable
Returns a new instance of Escapable.
6 7 8 9 10 11 |
# File 'lib/haml/escapable.rb', line 6 def initialize(opts = {}) super @escape_code = [:escape_code] || "::Haml::Util.escape_html#{[:use_html_safe] ? '_safe' : ''}((%s))" @escaper = eval("proc {|v| #{@escape_code % 'v'} }") end |