Class: Strava::V1::Effort

Inherits:
StravaResponse show all
Defined in:
lib/strava/v1/models/effort.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(js) ⇒ Effort

Returns a new instance of Effort.



10
11
12
13
14
# File 'lib/strava/v1/models/effort.rb', line 10

def initialize(js)
  @id = js["id"]
  @elapsed_time = js["elapsed_time"]
  @athlete = Athlete.new(js["athlete"]) if !js["athlete"].nil?
end

Instance Attribute Details

#athleteObject (readonly)

Returns the value of attribute athlete.



8
9
10
# File 'lib/strava/v1/models/effort.rb', line 8

def athlete
  @athlete
end

#elapsed_timeObject (readonly)

Returns the value of attribute elapsed_time.



8
9
10
# File 'lib/strava/v1/models/effort.rb', line 8

def elapsed_time
  @elapsed_time
end

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/strava/v1/models/effort.rb', line 8

def id
  @id
end