class Object

Public Instance Methods

scrape_events() click to toggle source

scrape all events from a single pahge def scrape_events doc = Nokogiri::HTML(open(“nationalteamroping.com/articles.sec-26-1-results.html”)) events = doc.css(“.title-txt h1”).text events.split('').map{|event| event.to_i }

# File lib/ntr_results/scrape_stager.rb, line 32
def scrape_events
doc = Nokogiri::HTML(open("http://nationalteamroping.com/articles.sec-26-1-results.html"))
events = doc.css(".title-txt h1").text
events.split('').map{|event| event.to_i }   # .split will not work on an array []
end