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) ⇒ Link
constructor
A new instance of Link.
Constructor Details
#initialize(target: nil, rel: nil) ⇒ Link
Returns a new instance of Link.
8 9 10 11 |
# File 'lib/auto_html/link.rb', line 8 def initialize(target: nil, rel: nil) @target = target @rel = rel end |
Instance Method Details
#call(text) ⇒ Object
13 14 15 |
# File 'lib/auto_html/link.rb', line 13 def call(text) Rinku.auto_link(text, :all, target_attr) end |