Class: AutoHtml::Link

Inherits:
Object
  • Object
show all
Defined in:
lib/auto_html/link.rb

Overview

Link filter

Instance Method Summary collapse

Constructor Details

#initialize(target: nil, rel: nil) ⇒ Link

Returns a new instance of Link.



10
11
12
13
# File 'lib/auto_html/link.rb', line 10

def initialize(target: nil, rel: nil)
  @target = target
  @rel = rel
end

Instance Method Details

#call(text) ⇒ Object



15
16
17
# File 'lib/auto_html/link.rb', line 15

def call(text)
  Rinku.auto_link(text, :all, attributes)
end