Class: TodaysPlan::Activity::Summary
- Inherits:
-
Object
- Object
- TodaysPlan::Activity::Summary
- Defined in:
- lib/todays_plan/activity/summary.rb
Instance Attribute Summary collapse
-
#ascent ⇒ Object
readonly
Returns the value of attribute ascent.
-
#avg_alt ⇒ Object
readonly
Returns the value of attribute avg_alt.
-
#avg_bpm ⇒ Object
readonly
Returns the value of attribute avg_bpm.
-
#avg_cadence ⇒ Object
readonly
Returns the value of attribute avg_cadence.
-
#avg_speed ⇒ Object
readonly
Returns the value of attribute avg_speed.
-
#avg_temp ⇒ Object
readonly
Returns the value of attribute avg_temp.
-
#avg_watts ⇒ Object
readonly
Returns the value of attribute avg_watts.
-
#calories ⇒ Object
readonly
Returns the value of attribute calories.
-
#descent ⇒ Object
readonly
Returns the value of attribute descent.
-
#distance ⇒ Object
readonly
Returns the value of attribute distance.
-
#ef ⇒ Object
readonly
Returns the value of attribute ef.
-
#idle ⇒ Object
readonly
Returns the value of attribute idle.
-
#intensity_factor ⇒ Object
readonly
Returns the value of attribute intensity_factor.
-
#kj ⇒ Object
readonly
Returns the value of attribute kj.
-
#max_alt ⇒ Object
readonly
Returns the value of attribute max_alt.
-
#max_bpm ⇒ Object
readonly
Returns the value of attribute max_bpm.
-
#max_cadence ⇒ Object
readonly
Returns the value of attribute max_cadence.
-
#max_speed ⇒ Object
readonly
Returns the value of attribute max_speed.
-
#max_temp ⇒ Object
readonly
Returns the value of attribute max_temp.
-
#max_watts ⇒ Object
readonly
Returns the value of attribute max_watts.
-
#min_alt ⇒ Object
readonly
Returns the value of attribute min_alt.
-
#min_bpm ⇒ Object
readonly
Returns the value of attribute min_bpm.
-
#min_temp ⇒ Object
readonly
Returns the value of attribute min_temp.
-
#min_watts ⇒ Object
readonly
Returns the value of attribute min_watts.
-
#np ⇒ Object
readonly
Returns the value of attribute np.
-
#power_meter ⇒ Object
readonly
Returns the value of attribute power_meter.
-
#sec_in_zone ⇒ Object
readonly
Returns the value of attribute sec_in_zone.
-
#threshold_bpm ⇒ Object
readonly
Returns the value of attribute threshold_bpm.
-
#threshold_watts ⇒ Object
readonly
Returns the value of attribute threshold_watts.
-
#ts ⇒ Object
readonly
Returns the value of attribute ts.
-
#tscorehr ⇒ Object
readonly
Returns the value of attribute tscorehr.
-
#tscorepwr ⇒ Object
readonly
Returns the value of attribute tscorepwr.
-
#vi ⇒ Object
readonly
Returns the value of attribute vi.
-
#vo2max ⇒ Object
readonly
Returns the value of attribute vo2max.
-
#wkg ⇒ Object
readonly
Returns the value of attribute wkg.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(fields) ⇒ Summary
constructor
A new instance of Summary.
Constructor Details
#initialize(fields) ⇒ Summary
Returns a new instance of Summary.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/todays_plan/activity/summary.rb', line 43 def initialize(fields) @min_watts = fields['minWatts'] @avg_watts = fields['avgWatts'] @max_watts = fields['maxWatts'] @threshold_watts = fields['thresholdWatts'] @tscorepwr = fields['tscorepwr'] @intensity_factor = fields['iff'] @kj = fields['kj'] @wkg = fields['wkg'] @np = fields['np'] @ef = fields['ef'] @vi = fields['vi'] @vo2max = fields['vo2max'] @min_bpm = fields['minBpm'] @avg_bpm = fields['avgBpm'] @max_bpm = fields['maxBpm'] @threshold_bpm = fields['thresholdBpm'] @tscorehr = fields['tscorehr'] @calories = fields['calories'] @min_alt = fields['minAlt'] @avg_alt = fields['avgAlt'] @max_alt = fields['maxAlt'] @ascent = fields["ascent"] @descent = fields["descent"] @avg_speed = fields['avgSpeed'] @max_speed = fields['maxSpeed'] @avg_cadence = fields['avgCadence'] @max_cadence = fields['maxCadence'] @min_temp = fields['minTemp'] @avg_temp = fields['avgTemp'] @max_temp = fields['maxTemp'] @idle = fields['idle'] @distance = fields['distance'] @ts = fields['ts'] @power_meter = fields.has_key?('powermeter') ? fields['powermeter']["name"] : nil end |
Instance Attribute Details
#ascent ⇒ Object (readonly)
Returns the value of attribute ascent.
29 30 31 |
# File 'lib/todays_plan/activity/summary.rb', line 29 def ascent @ascent end |
#avg_alt ⇒ Object (readonly)
Returns the value of attribute avg_alt.
27 28 29 |
# File 'lib/todays_plan/activity/summary.rb', line 27 def avg_alt @avg_alt end |
#avg_bpm ⇒ Object (readonly)
Returns the value of attribute avg_bpm.
20 21 22 |
# File 'lib/todays_plan/activity/summary.rb', line 20 def avg_bpm @avg_bpm end |
#avg_cadence ⇒ Object (readonly)
Returns the value of attribute avg_cadence.
36 37 38 |
# File 'lib/todays_plan/activity/summary.rb', line 36 def avg_cadence @avg_cadence end |
#avg_speed ⇒ Object (readonly)
Returns the value of attribute avg_speed.
31 32 33 |
# File 'lib/todays_plan/activity/summary.rb', line 31 def avg_speed @avg_speed end |
#avg_temp ⇒ Object (readonly)
Returns the value of attribute avg_temp.
34 35 36 |
# File 'lib/todays_plan/activity/summary.rb', line 34 def avg_temp @avg_temp end |
#avg_watts ⇒ Object (readonly)
Returns the value of attribute avg_watts.
7 8 9 |
# File 'lib/todays_plan/activity/summary.rb', line 7 def avg_watts @avg_watts end |
#calories ⇒ Object (readonly)
Returns the value of attribute calories.
25 26 27 |
# File 'lib/todays_plan/activity/summary.rb', line 25 def calories @calories end |
#descent ⇒ Object (readonly)
Returns the value of attribute descent.
30 31 32 |
# File 'lib/todays_plan/activity/summary.rb', line 30 def descent @descent end |
#distance ⇒ Object (readonly)
Returns the value of attribute distance.
39 40 41 |
# File 'lib/todays_plan/activity/summary.rb', line 39 def distance @distance end |
#ef ⇒ Object (readonly)
Returns the value of attribute ef.
16 17 18 |
# File 'lib/todays_plan/activity/summary.rb', line 16 def ef @ef end |
#idle ⇒ Object (readonly)
Returns the value of attribute idle.
38 39 40 |
# File 'lib/todays_plan/activity/summary.rb', line 38 def idle @idle end |
#intensity_factor ⇒ Object (readonly)
Returns the value of attribute intensity_factor.
12 13 14 |
# File 'lib/todays_plan/activity/summary.rb', line 12 def intensity_factor @intensity_factor end |
#kj ⇒ Object (readonly)
Returns the value of attribute kj.
13 14 15 |
# File 'lib/todays_plan/activity/summary.rb', line 13 def kj @kj end |
#max_alt ⇒ Object (readonly)
Returns the value of attribute max_alt.
28 29 30 |
# File 'lib/todays_plan/activity/summary.rb', line 28 def max_alt @max_alt end |
#max_bpm ⇒ Object (readonly)
Returns the value of attribute max_bpm.
21 22 23 |
# File 'lib/todays_plan/activity/summary.rb', line 21 def max_bpm @max_bpm end |
#max_cadence ⇒ Object (readonly)
Returns the value of attribute max_cadence.
37 38 39 |
# File 'lib/todays_plan/activity/summary.rb', line 37 def max_cadence @max_cadence end |
#max_speed ⇒ Object (readonly)
Returns the value of attribute max_speed.
32 33 34 |
# File 'lib/todays_plan/activity/summary.rb', line 32 def max_speed @max_speed end |
#max_temp ⇒ Object (readonly)
Returns the value of attribute max_temp.
35 36 37 |
# File 'lib/todays_plan/activity/summary.rb', line 35 def max_temp @max_temp end |
#max_watts ⇒ Object (readonly)
Returns the value of attribute max_watts.
8 9 10 |
# File 'lib/todays_plan/activity/summary.rb', line 8 def max_watts @max_watts end |
#min_alt ⇒ Object (readonly)
Returns the value of attribute min_alt.
26 27 28 |
# File 'lib/todays_plan/activity/summary.rb', line 26 def min_alt @min_alt end |
#min_bpm ⇒ Object (readonly)
Returns the value of attribute min_bpm.
19 20 21 |
# File 'lib/todays_plan/activity/summary.rb', line 19 def min_bpm @min_bpm end |
#min_temp ⇒ Object (readonly)
Returns the value of attribute min_temp.
33 34 35 |
# File 'lib/todays_plan/activity/summary.rb', line 33 def min_temp @min_temp end |
#min_watts ⇒ Object (readonly)
Returns the value of attribute min_watts.
6 7 8 |
# File 'lib/todays_plan/activity/summary.rb', line 6 def min_watts @min_watts end |
#np ⇒ Object (readonly)
Returns the value of attribute np.
15 16 17 |
# File 'lib/todays_plan/activity/summary.rb', line 15 def np @np end |
#power_meter ⇒ Object (readonly)
Returns the value of attribute power_meter.
40 41 42 |
# File 'lib/todays_plan/activity/summary.rb', line 40 def power_meter @power_meter end |
#sec_in_zone ⇒ Object (readonly)
Returns the value of attribute sec_in_zone.
10 11 12 |
# File 'lib/todays_plan/activity/summary.rb', line 10 def sec_in_zone @sec_in_zone end |
#threshold_bpm ⇒ Object (readonly)
Returns the value of attribute threshold_bpm.
22 23 24 |
# File 'lib/todays_plan/activity/summary.rb', line 22 def threshold_bpm @threshold_bpm end |
#threshold_watts ⇒ Object (readonly)
Returns the value of attribute threshold_watts.
9 10 11 |
# File 'lib/todays_plan/activity/summary.rb', line 9 def threshold_watts @threshold_watts end |
#ts ⇒ Object (readonly)
Returns the value of attribute ts.
41 42 43 |
# File 'lib/todays_plan/activity/summary.rb', line 41 def ts @ts end |
#tscorehr ⇒ Object (readonly)
Returns the value of attribute tscorehr.
23 24 25 |
# File 'lib/todays_plan/activity/summary.rb', line 23 def tscorehr @tscorehr end |
#tscorepwr ⇒ Object (readonly)
Returns the value of attribute tscorepwr.
11 12 13 |
# File 'lib/todays_plan/activity/summary.rb', line 11 def tscorepwr @tscorepwr end |
#vi ⇒ Object (readonly)
Returns the value of attribute vi.
17 18 19 |
# File 'lib/todays_plan/activity/summary.rb', line 17 def vi @vi end |
#vo2max ⇒ Object (readonly)
Returns the value of attribute vo2max.
18 19 20 |
# File 'lib/todays_plan/activity/summary.rb', line 18 def vo2max @vo2max end |
#wkg ⇒ Object (readonly)
Returns the value of attribute wkg.
14 15 16 |
# File 'lib/todays_plan/activity/summary.rb', line 14 def wkg @wkg end |