Sha256: 730c40907b8291fbe79f24f263c02c064d485791283153592ad054a2de167ff9

Contents?: true

Size: 641 Bytes

Versions: 1

Compression:

Stored size: 641 Bytes

Contents

class WorldTraveler::Highlights
    attr_accessor :name, :continent, :link, :info, :index
    @@all = []
     
    def initialize(name, continent, link)
      @name = name
      @continent = continent
      @link = link
      @info = []
    #   # notify month about the event
      add_to_continent
      save
    end 
    
    def self.all 
      @@all 
    end
    
    def add_to_continent
      @continent.highlights << self unless @continent.highlights.include?(self)
    end 
    
    def get_highlight_details
      WorldTraveler::Scraper.scrape_info(self) if @info.empty?
    end 
    
    def save
      @@all << self
    end
  end 

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
world_traveler-0.1.0 lib/world_traveler/highlights.rb