Class: QiitaExport::Fetcher::UrlFetcher
- Inherits:
-
ApiFetcher
- Object
- Base
- ApiFetcher
- QiitaExport::Fetcher::UrlFetcher
- Defined in:
- lib/qiita-export/fetcher/url_fetcher.rb
Instance Method Summary collapse
- #find_articles ⇒ Object
-
#initialize ⇒ UrlFetcher
constructor
A new instance of UrlFetcher.
Methods inherited from Base
Constructor Details
#initialize ⇒ UrlFetcher
Returns a new instance of UrlFetcher.
8 9 10 11 |
# File 'lib/qiita-export/fetcher/url_fetcher.rb', line 8 def initialize super() @endpoint = ApiEndPoint.instance(:item) end |
Instance Method Details
#find_articles ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/qiita-export/fetcher/url_fetcher.rb', line 13 def find_articles articles = [] article_urls.each do |url| article = to_article(find_article(url)) articles << article unless exclude?(article.title) end articles end |