class WorldTraveler::Highlights
Attributes
continent[RW]
info[RW]
link[RW]
name[RW]
Public Class Methods
all()
click to toggle source
# File lib/world_traveler/highlights.rb, line 14 def self.all @@all end
new(name, continent, link)
click to toggle source
# File lib/world_traveler/highlights.rb, line 5 def initialize(name, continent, link) @name = name @continent = continent @link = link @info = [] add_to_continent save end
Public Instance Methods
add_to_continent()
click to toggle source
# File lib/world_traveler/highlights.rb, line 18 def add_to_continent @continent.highlights << self unless @continent.highlights.include?(self) end
get_highlight_details()
click to toggle source
# File lib/world_traveler/highlights.rb, line 22 def get_highlight_details WorldTraveler::Scraper.scrape_info(self) if @info.empty? end
save()
click to toggle source
# File lib/world_traveler/highlights.rb, line 26 def save @@all << self end