Class: ClubHopper::Output
- Inherits:
-
Object
- Object
- ClubHopper::Output
- Defined in:
- lib/club_hopper/output.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#name ⇒ Object
Returns the value of attribute name.
Class Method Summary collapse
- .scrape_friday_event_output ⇒ Object
- .scrape_friday_outputnyc ⇒ Object
- .scrape_saturday_event_output ⇒ Object
- .scrape_saturday_outputnyc ⇒ Object
- .this_friday_output ⇒ Object
- .this_saturday_output ⇒ Object
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
2 3 4 |
# File 'lib/club_hopper/output.rb', line 2 def date @date end |
#name ⇒ Object
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_output ⇒ Object
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_outputnyc ⇒ Object
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_output ⇒ Object
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_outputnyc ⇒ Object
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_output ⇒ Object
5 6 7 |
# File 'lib/club_hopper/output.rb', line 5 def self.this_friday_output self.scrape_friday_event_output end |
.this_saturday_output ⇒ Object
9 10 11 |
# File 'lib/club_hopper/output.rb', line 9 def self.this_saturday_output self.scrape_saturday_event_output end |