Class: StravaApi::Club

Inherits:
HashBasedStore show all
Defined in:
lib/strava-api/club.rb

Constant Summary collapse

ATTRIBUTE_MAP =
{'name' => :name, 'id' => :id, 'description' => :description, 'location' => :location }

Instance Method Summary collapse

Methods inherited from HashBasedStore

#[], #id, #merge, #method_missing, #to_s

Constructor Details

#initialize(connection, options = {}) ⇒ Club

Returns a new instance of Club.



4
5
6
# File 'lib/strava-api/club.rb', line 4

def initialize(connection, options = {})
  super(connection, ATTRIBUTE_MAP, {}, options)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class StravaApi::HashBasedStore

Instance Method Details

#membersObject



13
14
15
# File 'lib/strava-api/club.rb', line 13

def members
  @connection.club_members(self.id)
end

#showObject



8
9
10
11
# File 'lib/strava-api/club.rb', line 8

def show
  self.merge(@connection.club_show(self.id))
  self
end