class RoadtripAdventures::Destination
Attributes
name[RW]
url[RW]
Public Class Methods
all()
click to toggle source
# File lib/roadtrip_adventures/destination.rb, line 10 def self.all @@destinations end
new()
click to toggle source
# File lib/roadtrip_adventures/destination.rb, line 6 def initialize @@destinations << self end
url_for_destination_name(destination_url)
click to toggle source
# File lib/roadtrip_adventures/destination.rb, line 14 def self.url_for_destination_name(destination_url) "https://www.lonelyplanet.com/#{destination_url.downcase.gsub(/[\s,]+/,"-")}/" end