class Meetup::LocatedGroups

Class to extract the located groups from meetup

Attributes

groups[R]

Public Class Methods

new(country:, location_raw_text:) click to toggle source
# File lib/meetupevents/group.rb, line 38
def initialize(country:, location_raw_text:)
  raw_groups = MeetupApi.get_groups(country, location_raw_text)
  @groups = raw_groups.map do |g|
    Concurrent::Promise.execute {
      Meetup::Group.new(
        name: g['name'], urlname: g['urlname'], city: g['city'],
        location: Meetup::Location.new(g['lat'], g['lon']),
        country: g['country']
      )
    }
  end
end