Class: QiitaExport::Fetcher::Base

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/qiita-export/fetcher/base.rb

Direct Known Subclasses

ApiFetcher, KobitoFetcher

Instance Method Summary collapse

Constructor Details

#initializeBase

Returns a new instance of Base.



14
15
16
# File 'lib/qiita-export/fetcher/base.rb', line 14

def initialize
  @config = ::QiitaExport::Config
end

Instance Method Details

#exclude?(title) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
25
26
27
# File 'lib/qiita-export/fetcher/base.rb', line 22

def exclude?(title)
  if !@config.exclude_pattern.nil? && /#{@config.exclude_pattern}/ =~ title
    return true
  end
  false
end

#find_articlesObject

Raises:

  • (NotImplementedError)


18
19
20
# File 'lib/qiita-export/fetcher/base.rb', line 18

def find_articles
  raise NotImplementedError.new("You must implement #{self.class}##{__method__}")
end