sources: add image_url?, page_url?, and profile_url? methods.
Add methods to Source::URL for determining whether a URL is an image URL, a page URL, or a profile URL. Also add more source URL tests and fix various URL parsing bugs.
This commit is contained in:
@@ -44,6 +44,10 @@ class Source::URL::Fandom < Source::URL
|
||||
end
|
||||
end
|
||||
|
||||
def image_url?
|
||||
full_image_url.present?
|
||||
end
|
||||
|
||||
def wiki
|
||||
WIKI_DB_NAMES.fetch(wiki_db_name, wiki_db_name)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user