Sha256: d504552e6965cbe1a8211903e98718b602647c6c33fb1a40b6d0293d7cd04104

Contents?: true

Size: 710 Bytes

Versions: 1

Compression:

Stored size: 710 Bytes

Contents

require 'strava/strava_response'
require 'strava/v1/models/athlete'

module Strava
  module V1
    class Ride < StravaResponse
      attr_reader :id, :name, :distance, :moving_time, :average_speed, :average_watts, :name, :elevation_gain, :athlete
      attr_accessor :segments

      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
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
strava-api-v2-0.1 lib/strava/v1/models/ride.rb