Sha256: e53e3eec2c5e7714b51f208868e96bbb6ccc1dfd4805d00eb221944057f897ac

Contents?: true

Size: 322 Bytes

Versions: 1

Compression:

Stored size: 322 Bytes

Contents

module AutoHtml
  def self.add_filter(name, &block)
    AutoHtml::Builder.add_filter(name, &block)
  end

  def auto_html(raw, &proc)
    return "" if raw.blank?
    builder = Builder.new(raw)
    result = builder.instance_eval(&proc)
    result.respond_to?(:html_safe) ?
      result.html_safe :
        result
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
auto_html-1.4.0 lib/auto_html/base.rb