Skip to content
Snippets Groups Projects
Commit f0de4450 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

fix twitter

parent 5d32e333
No related branches found
No related tags found
No related merge requests found
class ContactDetails::Twitter < ContactDetails::Website
ROOT = 'twitter.com/'
class ContactDetails::Twitter < ContactDetails::Base
URL = 'https://twitter.com'
DOMAIN = 'twitter.com'
protected
# arnaudlevy
# twitter.com/arnaudlevy
# https://twitter.com/arnaudlevy
# TODO vrais tests
def prepare_url
@url = @string
@url.remove! DOMAIN if @url.start_with? DOMAIN
@url.remove! URL if @url.start_with? URL
@url.delete_suffix! '/'
@url.delete_prefix! '/'
@url = "#{URL}/#{@string}"
end
def prepare_label
super
@label.remove! ROOT
@label.remove! URL
end
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment