Class: MeetupCli::Category
- Inherits:
-
Object
- Object
- MeetupCli::Category
- Defined in:
- lib/meetup_cli/category.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #activities ⇒ Object
-
#initialize(name, url) ⇒ Category
constructor
A new instance of Category.
Constructor Details
#initialize(name, url) ⇒ Category
Returns a new instance of Category.
4 5 6 7 |
# File 'lib/meetup_cli/category.rb', line 4 def initialize(name, url) @name = name @url = url end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/meetup_cli/category.rb', line 2 def name @name end |
#url ⇒ Object
Returns the value of attribute url.
2 3 4 |
# File 'lib/meetup_cli/category.rb', line 2 def url @url end |
Instance Method Details
#activities ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/meetup_cli/category.rb', line 10 def activities #array of all activities in the area based on the category #scrape the url to get all the activities #create Activiy objects and fill in the array activities_array =MeetupCli::Scraper.activities(self) activities_array end |