Class: Strava::V1::Ride
- Inherits:
-
StravaResponse
- Object
- StravaResponse
- Strava::V1::Ride
- Defined in:
- lib/strava/v1/models/ride.rb
Instance Attribute Summary collapse
-
#athlete ⇒ Object
readonly
Returns the value of attribute athlete.
-
#average_speed ⇒ Object
readonly
Returns the value of attribute average_speed.
-
#average_watts ⇒ Object
readonly
Returns the value of attribute average_watts.
-
#distance ⇒ Object
readonly
Returns the value of attribute distance.
-
#elevation_gain ⇒ Object
readonly
Returns the value of attribute elevation_gain.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#moving_time ⇒ Object
readonly
Returns the value of attribute moving_time.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#segments ⇒ Object
Returns the value of attribute segments.
Instance Method Summary collapse
-
#initialize(json) ⇒ Ride
constructor
A new instance of Ride.
Constructor Details
#initialize(json) ⇒ Ride
Returns a new instance of Ride.
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/strava/v1/models/ride.rb', line 10 def initialize(json) @id = json["id"] @name = json["name"] @distance = json["distance"] @moving_time = json["moving_time"] @average_speed = json["average_speed"] @average_watts = json["average_watts"] @name = json["name"] @elevation_gain = json["elevationGain"] @athlete = Athlete.new(json["athlete"]) if !json["athlete"].nil? end |
Instance Attribute Details
#athlete ⇒ Object (readonly)
Returns the value of attribute athlete.
7 8 9 |
# File 'lib/strava/v1/models/ride.rb', line 7 def athlete @athlete end |
#average_speed ⇒ Object (readonly)
Returns the value of attribute average_speed.
7 8 9 |
# File 'lib/strava/v1/models/ride.rb', line 7 def average_speed @average_speed end |
#average_watts ⇒ Object (readonly)
Returns the value of attribute average_watts.
7 8 9 |
# File 'lib/strava/v1/models/ride.rb', line 7 def average_watts @average_watts end |
#distance ⇒ Object (readonly)
Returns the value of attribute distance.
7 8 9 |
# File 'lib/strava/v1/models/ride.rb', line 7 def distance @distance end |
#elevation_gain ⇒ Object (readonly)
Returns the value of attribute elevation_gain.
7 8 9 |
# File 'lib/strava/v1/models/ride.rb', line 7 def elevation_gain @elevation_gain end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/strava/v1/models/ride.rb', line 7 def id @id end |
#moving_time ⇒ Object (readonly)
Returns the value of attribute moving_time.
7 8 9 |
# File 'lib/strava/v1/models/ride.rb', line 7 def moving_time @moving_time end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/strava/v1/models/ride.rb', line 7 def name @name end |
#segments ⇒ Object
Returns the value of attribute segments.
8 9 10 |
# File 'lib/strava/v1/models/ride.rb', line 8 def segments @segments end |