class Meetup::City

Class to set up a Meetup Group

Attributes

country[R]
events[R]
groups[R]
location[R]
name[R]
topic[R]

Public Class Methods

find(id:) click to toggle source
# File lib/meetupevents/city.rb, line 38
def self.find(id:)
  city_data = MeetupApi.cities_info(id)[0]
  new(name: city_data['city'],
      location: Meetup::Location.new(city_data['lat'],
                                     city_data['lon']),
      country: city_data['country'])
end
new(name:, location:, country:, topic: 'none') click to toggle source
# File lib/meetupevents/city.rb, line 16
def initialize(name:, location:, country:, topic: 'none')
  @name = name
  @location = location
  @country = country
  @topic = topic
end