blob: c24e7a688bea6afb496fad4673c9d6f0ca33e0a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# -*- coding: utf-8 -*-
require_relative 'regexp_entity'
module Retriever::Entity
=begin rdoc
schemeはhttpまたはhttpsのURLを全てリンクにするEntity。
==== Examples
Retriever::Entity::URLEntity.new(message)
=end
URLEntity = Retriever::Entity::RegexpEntity.filter(URI.regexp(%w<http https>),
generator: ->s{ s.merge(open: s[:url]) })
end
|