Sha256: 6e6cfde6e660c3558bd956b3c715190922be8a456a19e182ee491ff444bb8152
Contents?: true
Size: 416 Bytes
Versions: 21
Compression:
Stored size: 416 Bytes
Contents
module AutoHtml class Filter def initialize(block) @block = block @options = nil end def with(options, &block) @options = options @block = block end def apply(text, options = {}) _options = @options && @options.merge(options) if _options @block.call(text.to_s.dup, _options) else @block.call(text.to_s.dup) end end end end
Version data entries
21 entries across 21 versions & 3 rubygems