Class: Bypass::TextFilter

Inherits:
Filter
  • Object
show all
Defined in:
lib/bypass/text_filter.rb

Constant Summary

Constants inherited from Filter

Filter::URL_PATTERN

Instance Attribute Summary

Attributes inherited from Filter

#content

Instance Method Summary collapse

Methods inherited from Filter

#initialize, #to_s

Constructor Details

This class inherits a constructor from Bypass::Filter

Instance Method Details



10
# File 'lib/bypass/text_filter.rb', line 10

def auto_link(options = {}); end

#replace(&block) ⇒ Object



4
5
6
7
8
# File 'lib/bypass/text_filter.rb', line 4

def replace(&block)
  @content = gsub_urls(content) do |url| 
    yield(Bypass::URI.parse(url)).to_s
  end
end