Class: Strava::V2::Effort

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ejs) ⇒ Effort

Initialize the Effort ejs - the effort JSON



11
12
13
14
15
16
# File 'lib/strava/v2/models/effort.rb', line 11

def initialize(ejs)
  @id = ejs["id"]
  @elapsed_time = ejs["elapsed_time"]
  @moving_time = ejs["moving_time"]
  @distance = ejs["distance"]
end

Instance Attribute Details

#distanceObject (readonly)

Returns the value of attribute distance.



7
8
9
# File 'lib/strava/v2/models/effort.rb', line 7

def distance
  @distance
end

#elapsed_timeObject (readonly)

Returns the value of attribute elapsed_time.



7
8
9
# File 'lib/strava/v2/models/effort.rb', line 7

def elapsed_time
  @elapsed_time
end

#idObject (readonly)

Returns the value of attribute id.



7
8
9
# File 'lib/strava/v2/models/effort.rb', line 7

def id
  @id
end

#moving_timeObject (readonly)

Returns the value of attribute moving_time.



7
8
9
# File 'lib/strava/v2/models/effort.rb', line 7

def moving_time
  @moving_time
end