Class: MeetupCli::Activity
- Inherits:
-
Object
- Object
- MeetupCli::Activity
- Defined in:
- lib/meetup_cli/activity.rb
Instance Attribute Summary collapse
-
#about ⇒ Object
Returns the value of attribute about.
-
#location ⇒ Object
Returns the value of attribute location.
-
#meetup ⇒ Object
Returns the value of attribute meetup.
-
#name ⇒ Object
Returns the value of attribute name.
-
#organiser ⇒ Object
Returns the value of attribute organiser.
-
#tag_line ⇒ Object
Returns the value of attribute tag_line.
-
#total_members ⇒ Object
Returns the value of attribute total_members.
-
#type_of_group ⇒ Object
Returns the value of attribute type_of_group.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #display_meetups ⇒ Object
-
#initialize(name, url, tag_line) ⇒ Activity
constructor
A new instance of Activity.
- #list_meetup ⇒ Object
Constructor Details
#initialize(name, url, tag_line) ⇒ Activity
4 5 6 7 8 |
# File 'lib/meetup_cli/activity.rb', line 4 def initialize(name, url, tag_line) @name = name @url = url @tag_line = tag_line end |
Instance Attribute Details
#about ⇒ Object
Returns the value of attribute about.
2 3 4 |
# File 'lib/meetup_cli/activity.rb', line 2 def about @about end |
#location ⇒ Object
Returns the value of attribute location.
2 3 4 |
# File 'lib/meetup_cli/activity.rb', line 2 def location @location end |
#meetup ⇒ Object
Returns the value of attribute meetup.
2 3 4 |
# File 'lib/meetup_cli/activity.rb', line 2 def meetup @meetup end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/meetup_cli/activity.rb', line 2 def name @name end |
#organiser ⇒ Object
Returns the value of attribute organiser.
2 3 4 |
# File 'lib/meetup_cli/activity.rb', line 2 def organiser @organiser end |
#tag_line ⇒ Object
Returns the value of attribute tag_line.
2 3 4 |
# File 'lib/meetup_cli/activity.rb', line 2 def tag_line @tag_line end |
#total_members ⇒ Object
Returns the value of attribute total_members.
2 3 4 |
# File 'lib/meetup_cli/activity.rb', line 2 def total_members @total_members end |
#type_of_group ⇒ Object
Returns the value of attribute type_of_group.
2 3 4 |
# File 'lib/meetup_cli/activity.rb', line 2 def type_of_group @type_of_group end |
#url ⇒ Object
Returns the value of attribute url.
2 3 4 |
# File 'lib/meetup_cli/activity.rb', line 2 def url @url end |
Instance Method Details
#display_meetups ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/meetup_cli/activity.rb', line 16 def display_meetups list_meetup puts "#{@name}" puts "#{@location}" puts "#{@type_of_group}" puts "#{@organiser}" puts "#{@total_members}" puts "#{@about}" if @meetup.upcoming @meetup.display else "Sorry no upcoming meetups!!" end end |
#list_meetup ⇒ Object
10 11 12 13 14 |
# File 'lib/meetup_cli/activity.rb', line 10 def list_meetup # scrape url/events gives no upcoming meetups set up the method upcoming? = false #create the meetup MeetupCli::Scraper.list_meetup(self) end |