class ActionText::Content

def links

content.links # => ["http://example.com/"]
content = ActionText::Content.new(html)
html = 'Example'

Extracts links from the HTML fragment:
def links
  @links ||= fragment.find_all("a[href]").map { |a| a["href"] }.uniq
end