class NtrResults::EventScraper

Public Instance Methods

event() click to toggle source
# File lib/ntr_results/event_scraper.rb, line 3
def event
  Nokogiri::HTML(open("http://nationalteamroping.com/articles.sec-26-1-results.html"))
end
scrape_ntr() click to toggle source
# File lib/ntr_results/event_scraper.rb, line 7
def scrape_ntr
    # doc = Nokogiri::HTML(open("http://nationalteamroping.com/articles.sec-26-1-results.html"))
    event = self.new
    event.name = doc.css(".title-txt h1 a").collect{|e| e.text}
    # event.name = doc.css(".title-txt h1 a").collect{ |e| "#{e}"}
    # event.name = doc.css(".title-txt h1 a").collect.to_s{ |e| "#{e}"}
    event
end