class ShowListings::Listing
Public Class Methods
new(home, selection_number)
click to toggle source
# File lib/show_listings/listing.rb, line 3 def initialize(home, selection_number) @home = home @selection_number = selection_number end
Public Instance Methods
buy_link()
click to toggle source
# File lib/show_listings/listing.rb, line 8 def buy_link @home.css(".ds-event-category-music")[@selection_number-1].css(".ds-buy-tix").css("a").first["href"] end
info_link()
click to toggle source
# File lib/show_listings/listing.rb, line 12 def info_link "http://nyc-shows.brooklynvegan.com/" + @home.css(".ds-event-category-music")[@selection_number-1].css("a").first["href"] end
open_buy()
click to toggle source
# File lib/show_listings/listing.rb, line 16 def open_buy puts "\nYou can buy tickets here...Goodbye!" sleep(0.5) Launchy.open(buy_link) exit end
open_info()
click to toggle source
# File lib/show_listings/listing.rb, line 23 def open_info puts "\nOpening the page for that show...Goodbye!" sleep(0.5) Launchy.open(info_link) exit end