Class: OrlandoTechMeetups::Meetups

Inherits:
Object
  • Object
show all
Defined in:
lib/orlando_tech_meetups/meetups.rb

Constant Summary collapse

MEETUP_URL =
[
  "http://www.meetup.com/Code-For-Orlando/",
  "http://meetup.com/orlando-tech/",
  "http://www.meetup.com/The-Iron-Yard-Orlando/",
  "http://www.meetup.com/Front-End-Orlando/",
  "http://www.meetup.com/Downtown-UX-Meetup/",
  "http://www.meetup.com/Orlando-Ruby/",
  "http://www.meetup.com/OrlandoJS/",
  "http://www.meetup.com/orlandodojo/",
  "http://www.meetup.com/Central-Florida-RPi-Users-Group/",
  "http://www.meetup.com/iot-orlando/"
]
@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name.



2
3
4
# File 'lib/orlando_tech_meetups/meetups.rb', line 2

def name
  @name
end

#next_meetupObject

Returns the value of attribute next_meetup.



2
3
4
# File 'lib/orlando_tech_meetups/meetups.rb', line 2

def next_meetup
  @next_meetup
end

#urlObject

Returns the value of attribute url.



2
3
4
# File 'lib/orlando_tech_meetups/meetups.rb', line 2

def url
  @url
end

Class Method Details

.allObject



6
7
8
9
# File 'lib/orlando_tech_meetups/meetups.rb', line 6

def self.all
  self.scrape_meetups if @@all == [] 
  @@all
end

.scrape_meetupsObject



28
29
30
31
32
33
34
35
# File 'lib/orlando_tech_meetups/meetups.rb', line 28

def self.scrape_meetups
  s = OrlandoTechMeetups::Scraper.new
  MEETUP_URL.each do |url|
    print "."
    s.scraper(url) 
  end
  puts "\n"
end

Instance Method Details

#saveObject



11
12
13
# File 'lib/orlando_tech_meetups/meetups.rb', line 11

def save 
  @@all << self 
end