Class: Hatena::Keyword::Link
Instance Method Summary collapse
Methods inherited from Service
Constructor Details
This class inherits a constructor from Hatena::Keyword::Service
Instance Method Details
#replace(&block) ⇒ Object
64 65 66 |
# File 'lib/hatena/keyword.rb', line 64 def replace(&block) result.gsub(%r{<a class="#{option(:a_class)}".*?>(.*?)</a>}i) {block.call($1)} end |