Sha256: 0d94e1e43811fff8a35b9eb626b6bd2b8edc6c2187db388bba379fb8885f08d8

Contents?: true

Size: 335 Bytes

Versions: 18

Compression:

Stored size: 335 Bytes

Contents

require 'hamlit/utils'

module Hamlit
  class Escapable < Temple::Filters::Escapable
    def initialize(opts = {})
      super
      @escape_code = options[:escape_code] ||
        "::Hamlit::Utils.escape_html#{options[:use_html_safe] ? '_safe' : ''}((%s))"
      @escaper = eval("proc {|v| #{@escape_code % 'v'} }")
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
hamlit-2.2.4 lib/hamlit/escapable.rb
hamlit-2.6.1 lib/hamlit/escapable.rb
hamlit-2.6.0 lib/hamlit/escapable.rb
hamlit-2.5.0 lib/hamlit/escapable.rb
hamlit-2.4.2 lib/hamlit/escapable.rb
hamlit-2.4.1 lib/hamlit/escapable.rb
hamlit-2.4.0 lib/hamlit/escapable.rb
hamlit-2.3.1 lib/hamlit/escapable.rb
hamlit-2.3.0 lib/hamlit/escapable.rb
hamlit-2.2.3 lib/hamlit/escapable.rb
hamlit-2.2.2 lib/hamlit/escapable.rb
hamlit-2.2.1 lib/hamlit/escapable.rb
hamlit-2.2.0 lib/hamlit/escapable.rb
hamlit-2.1.2 lib/hamlit/escapable.rb
hamlit-2.1.1 lib/hamlit/escapable.rb
hamlit-2.1.0 lib/hamlit/escapable.rb
hamlit-2.0.2 lib/hamlit/escapable.rb
hamlit-2.0.1 lib/hamlit/escapable.rb