Class: Zemanta::Enhancer

Inherits:
Object
  • Object
show all
Defined in:
lib/zemanta/enhancer.rb

Instance Method Summary collapse

Constructor Details

#initialize(text, opts = {}) ⇒ Enhancer

Options:

no_duplicates (default: false) - ensures links are used once
skip - regexp for URLs not to be hot-linked
strip_query_string - remove the query string from urls


9
10
11
12
# File 'lib/zemanta/enhancer.rb', line 9

def initialize(text, opts = {})
  @text = text
  @opts = opts
end

Instance Method Details

#enhanceObject



14
15
16
17
# File 'lib/zemanta/enhancer.rb', line 14

def enhance
  enhance!
  @text
end