Class: Strava::V2::Effort
- Inherits:
-
StravaResponse
- Object
- StravaResponse
- Strava::V2::Effort
- Defined in:
- lib/strava/v2/models/effort.rb
Instance Attribute Summary collapse
-
#distance ⇒ Object
readonly
Returns the value of attribute distance.
-
#elapsed_time ⇒ Object
readonly
Returns the value of attribute elapsed_time.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#moving_time ⇒ Object
readonly
Returns the value of attribute moving_time.
Instance Method Summary collapse
-
#initialize(ejs) ⇒ Effort
constructor
Initialize the Effort ejs - the effort JSON.
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
#distance ⇒ Object (readonly)
Returns the value of attribute distance.
7 8 9 |
# File 'lib/strava/v2/models/effort.rb', line 7 def distance @distance end |
#elapsed_time ⇒ Object (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 |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/strava/v2/models/effort.rb', line 7 def id @id end |
#moving_time ⇒ Object (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 |