Class: AutoHtml::Link
- Inherits:
-
Object
- Object
- AutoHtml::Link
- Defined in:
- lib/auto_html/link.rb
Overview
Link filter
Instance Method Summary collapse
- #call(text) ⇒ Object
-
#initialize(target: nil, rel: nil, short_domains: false) ⇒ Link
constructor
A new instance of Link.
Constructor Details
#initialize(target: nil, rel: nil, short_domains: false) ⇒ Link
Returns a new instance of Link.
10 11 12 13 14 |
# File 'lib/auto_html/link.rb', line 10 def initialize(target: nil, rel: nil, short_domains: false) @target = target @rel = rel @short_domains = short_domains end |
Instance Method Details
#call(text) ⇒ Object
16 17 18 |
# File 'lib/auto_html/link.rb', line 16 def call(text) Rinku.auto_link(text, :all, attributes, nil, flags) end |