Sha256: 9ccd06fbc89c11b6b266e7734cf7d01bc841bfd41676608dc412a464df711604
Contents?: true
Size: 368 Bytes
Versions: 12
Compression:
Stored size: 368 Bytes
Contents
module AutoHtml extend self 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) return raw if result.nil? result.respond_to?(:html_safe) ? result.html_safe : result end end
Version data entries
12 entries across 12 versions & 1 rubygems