Method: Ubi::Memoria::Site#initialize
- Defined in:
- lib/ubi/memorias/site.rb
#initialize(text, _hint = nil, opts = {}) ⇒ Site
Returns a new instance of Site.
7 8 9 10 11 12 13 |
# File 'lib/ubi/memorias/site.rb', line 7 def initialize(text, _hint = nil, opts = {}) text = text.downcase.gsub(/^\(|\.$/, '') text = "http://#{text}" unless text =~ %r{^\w{3,5}://} @text = text @link = tld_parser @opts = opts end |