Class: ClubHopper::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/club_hopper/output.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#dateObject

Returns the value of attribute date.



2
3
4
# File 'lib/club_hopper/output.rb', line 2

def date
  @date
end

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/club_hopper/output.rb', line 2

def name
  @name
end

Class Method Details

.scrape_friday_event_outputObject



13
14
15
16
# File 'lib/club_hopper/output.rb', line 13

def self.scrape_friday_event_output
events = []
events << self.scrape_friday_outputnyc
end

.scrape_friday_outputnycObject



24
25
26
27
28
29
30
31
# 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_outputObject



18
19
20
21
# File 'lib/club_hopper/output.rb', line 18

def self.scrape_saturday_event_output
events = []
events << self.scrape_saturday_outputnyc
end

.scrape_saturday_outputnycObject



33
34
35
36
37
38
39
40
# 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_outputObject



5
6
7
# File 'lib/club_hopper/output.rb', line 5

def self.this_friday_output   
self.scrape_friday_event_output
end

.this_saturday_outputObject



9
10
11
# File 'lib/club_hopper/output.rb', line 9

def self.this_saturday_output   
self.scrape_saturday_event_output
end