Class: Relaton::Oasis::DataFetcher
- Inherits:
-
Core::DataFetcher
- Object
- Core::DataFetcher
- Relaton::Oasis::DataFetcher
- Defined in:
- lib/relaton/oasis/data_fetcher.rb
Instance Method Summary collapse
Instance Method Details
#fetch(_source = nil) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/relaton/oasis/data_fetcher.rb', line 14 def fetch(_source = nil) agent = Mechanize.new resp = agent.get "https://www.oasis-open.org/standards/" doc = Nokogiri::HTML resp.body doc.xpath("//details").map do |item| save_doc DataParser.new(item, @errors).parse fetch_parts item end index.save report_errors end |
#log_error(msg) ⇒ Object
10 11 12 |
# File 'lib/relaton/oasis/data_fetcher.rb', line 10 def log_error(msg) Util.error msg end |