Class: Bypass::TextFilter
Constant Summary
Constants inherited
from Filter
Filter::URL_PATTERN
Instance Attribute Summary
Attributes inherited from Filter
#content, #fragment
Instance Method Summary
collapse
Methods inherited from Filter
#initialize, #to_s
Constructor Details
This class inherits a constructor from Bypass::Filter
Instance Method Details
#auto_link(options = {}) ⇒ Object
12
|
# File 'lib/bypass/text_filter.rb', line 12
def auto_link(options = {}); end
|
#replace(&block) ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/bypass/text_filter.rb', line 4
def replace(&block)
@content = gsub_urls(content) do |url|
if parsed_url = parse_uri(url)
yield(parsed_url).to_s
end
end
end
|