Method: Osm::Event#spaces

Defined in:
lib/osm/event.rb

#spaces(api) ⇒ Fixnum?

Get the number of spaces left for the event

Parameters:

  • api (Osm::Api)

    The api to use to make the request

Returns:

  • (Fixnum, nil)

    the number of spaces left (nil if there is no attendance limit)



487
488
489
490
# File 'lib/osm/event.rb', line 487

def spaces(api)
  return nil unless limited_attendance?
  return attendance_limit - attendees(api)
end