sources: rename Sources::Strategies to Source::Extractor.
Rename Sources::Strategies to Source::Extractor. A Source::Extractor represents a thing that extracts information from a given URL.
This commit is contained in:
19
app/logical/source/extractor/null.rb
Normal file
19
app/logical/source/extractor/null.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Source
|
||||
class Extractor
|
||||
class Null < Source::Extractor
|
||||
def image_urls
|
||||
[url]
|
||||
end
|
||||
|
||||
def page_url
|
||||
nil
|
||||
end
|
||||
|
||||
def artists
|
||||
ArtistFinder.find_artists(url)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user