class Shark::Scraper
Attributes
sharks[RW]
Public Instance Methods
get_page()
click to toggle source
# File lib/shark/shark_scraper.rb, line 14 def get_page Nokogiri::HTML(open('https://oceana.org/marine-life/sharks-rays')) end
make_sharks()
click to toggle source
# File lib/shark/shark_scraper.rb, line 22 def make_sharks scrape_shark_encyclopedia.each do |shark| Shark::SharkRays.new_from_shark_index(shark) end end
scrape_shark_encyclopedia()
click to toggle source
# File lib/shark/shark_scraper.rb, line 18 def scrape_shark_encyclopedia self.get_page.css("section.block-callout-action-contain article") end