Class: StravaApi::Club
- Inherits:
-
HashBasedStore
- Object
- HashBasedStore
- StravaApi::Club
- Defined in:
- lib/strava-api/club.rb
Constant Summary collapse
- ATTRIBUTE_MAP =
{'name' => :name, 'id' => :id, 'description' => :description, 'location' => :location }
Instance Method Summary collapse
-
#initialize(connection, options = {}) ⇒ Club
constructor
A new instance of Club.
- #members ⇒ Object
- #show ⇒ Object
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, = {}) super(connection, ATTRIBUTE_MAP, {}, ) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class StravaApi::HashBasedStore
Instance Method Details
#members ⇒ Object
13 14 15 |
# File 'lib/strava-api/club.rb', line 13 def members @connection.club_members(self.id) end |
#show ⇒ Object
8 9 10 11 |
# File 'lib/strava-api/club.rb', line 8 def show self.merge(@connection.club_show(self.id)) self end |