Class: HofStats::Scraper
- Inherits:
-
Object
- Object
- HofStats::Scraper
- Defined in:
- lib/hof_stats/scraper.rb
Instance Method Summary collapse
Instance Method Details
#get_page ⇒ Object
3 4 5 |
# File 'lib/hof_stats/scraper.rb', line 3 def get_page Nokogiri::HTML(open("https://www.baseball-reference.com/awards/hof.shtml")) end |
#make_player ⇒ Object
11 12 13 14 15 |
# File 'lib/hof_stats/scraper.rb', line 11 def make_player scrape_baseball_index.each do |p| HofStats::Player.new_from_index(p) end end |
#scrape_baseball_index ⇒ Object
7 8 9 |
# File 'lib/hof_stats/scraper.rb', line 7 def scrape_baseball_index self.get_page.css("tbody tr") end |