class ClubHopper::Output

Attributes

date[RW]
name[RW]

Public Class Methods

scrape_friday_event_output() click to toggle source
# File lib/club_hopper/output.rb, line 13
def self.scrape_friday_event_output
events = []
events << self.scrape_friday_outputnyc
end
scrape_friday_outputnyc() click to toggle source
# File lib/club_hopper/output.rb, line 24
def self.scrape_friday_outputnyc
doc = Nokogiri::HTML(open("http://outputclub.com/"))
event = self.new
event.name = doc.css("#content > article.post-4220.post.type-post.status-publish.format-standard.hentry.category-uncategorized > ul > li > h2:nth-child(1)").text
event.date = doc.css("#content > article.post-4220.post.type-post.status-publish.format-standard.hentry.category-uncategorized > h1:nth-child(2)").text  

event
end
scrape_saturday_event_output() click to toggle source
# File lib/club_hopper/output.rb, line 18
def self.scrape_saturday_event_output
events = []
events << self.scrape_saturday_outputnyc
end
scrape_saturday_outputnyc() click to toggle source
# File lib/club_hopper/output.rb, line 33
def self.scrape_saturday_outputnyc
doc = Nokogiri::HTML(open("http://outputclub.com/"))
event = self.new
event.name = doc.css("#content > article.post-4065.post.type-post.status-publish.format-standard.hentry.category-uncategorized > ul > li > h2:nth-child(1)").text
event.date = doc.css("#content > article.post-4065.post.type-post.status-publish.format-standard.hentry.category-uncategorized > h1:nth-child(2)").text

event
end
this_friday_output() click to toggle source
# File lib/club_hopper/output.rb, line 5
def self.this_friday_output   
self.scrape_friday_event_output
end
this_saturday_output() click to toggle source
# File lib/club_hopper/output.rb, line 9
def self.this_saturday_output   
self.scrape_saturday_event_output
end