Class: DoctorScrape::Scraper::Bora
- Defined in:
- lib/doctor_scrape/scraper/bora.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#doc, #errors?, #fetch, #initialize, #scrape
Constructor Details
This class inherits a constructor from DoctorScrape::Scraper::Base
Instance Method Details
#parse ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/doctor_scrape/scraper/bora.rb', line 6 def parse doc.search("table.itemDisplayTable tr").each do |el| key, value = el.children[0..1].map &:text next unless key =~ /^dc\./ attribute = key.match(/\.(?<attr>[a-z]+)$/)[:attr] @data.send("#{attribute}=", value) end @data.permalink = @data.uri @data.pdf = pdf_from_link end |
#url ⇒ Object
20 21 22 |
# File 'lib/doctor_scrape/scraper/bora.rb', line 20 def url "#{@url}?mode=full" end |