class AbstractSyncer
Public Class Methods
new(uri)
click to toggle source
# File lib/syncers/abstract_syncer.rb, line 10 def initialize(uri) @uri = uri end
Public Instance Methods
_fetch_html()
click to toggle source
# File lib/syncers/abstract_syncer.rb, line 14 def _fetch_html uri = @uri res = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => true) do |http| # :use_ssl => true for the uri is https http.request(Net::HTTP::Get.new(uri, {'User-Agent' => USER_AGENT})) end res.body end
gen_html()
click to toggle source
# File lib/syncers/abstract_syncer.rb, line 32 def gen_html raise MESSAGE % [__method__] end
get_article_nodes()
click to toggle source
# File lib/syncers/abstract_syncer.rb, line 28 def get_article_nodes raise MESSAGE % [__method__] end
get_article_xpath()
click to toggle source
# File lib/syncers/abstract_syncer.rb, line 24 def get_article_xpath raise MESSAGE % [__method__] end