Class: TodaysPlan::Activity::Power
- Inherits:
-
Object
- Object
- TodaysPlan::Activity::Power
- Defined in:
- lib/todays_plan/activity/power.rb
Instance Attribute Summary collapse
-
#avg_watts ⇒ Object
readonly
Returns the value of attribute avg_watts.
-
#ef ⇒ Object
readonly
Returns the value of attribute ef.
-
#intensity_factor ⇒ Object
readonly
Returns the value of attribute intensity_factor.
-
#kj ⇒ Object
readonly
Returns the value of attribute kj.
-
#max_watts ⇒ Object
readonly
Returns the value of attribute max_watts.
-
#min_watts ⇒ Object
readonly
Returns the value of attribute min_watts.
-
#np ⇒ Object
readonly
Returns the value of attribute np.
-
#sec_in_zone ⇒ Object
readonly
Returns the value of attribute sec_in_zone.
-
#threshold_watts ⇒ Object
readonly
Returns the value of attribute threshold_watts.
-
#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) ⇒ Power
constructor
A new instance of Power.
Constructor Details
#initialize(fields) ⇒ Power
Returns a new instance of Power.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/todays_plan/activity/power.rb', line 20 def initialize(fields) @min_watts = fields['minWatts'] @avg_watts = fields['avgWatts'] @max_watts = fields['maxWatts'] @threshold_watts = fields['thresholdWatts'] @sec_in_zone = fields["secsInZonePwr"] @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'] end |
Instance Attribute Details
#avg_watts ⇒ Object (readonly)
Returns the value of attribute avg_watts.
7 8 9 |
# File 'lib/todays_plan/activity/power.rb', line 7 def avg_watts @avg_watts end |
#ef ⇒ Object (readonly)
Returns the value of attribute ef.
16 17 18 |
# File 'lib/todays_plan/activity/power.rb', line 16 def ef @ef end |
#intensity_factor ⇒ Object (readonly)
Returns the value of attribute intensity_factor.
12 13 14 |
# File 'lib/todays_plan/activity/power.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/power.rb', line 13 def kj @kj end |
#max_watts ⇒ Object (readonly)
Returns the value of attribute max_watts.
8 9 10 |
# File 'lib/todays_plan/activity/power.rb', line 8 def max_watts @max_watts end |
#min_watts ⇒ Object (readonly)
Returns the value of attribute min_watts.
6 7 8 |
# File 'lib/todays_plan/activity/power.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/power.rb', line 15 def np @np end |
#sec_in_zone ⇒ Object (readonly)
Returns the value of attribute sec_in_zone.
10 11 12 |
# File 'lib/todays_plan/activity/power.rb', line 10 def sec_in_zone @sec_in_zone end |
#threshold_watts ⇒ Object (readonly)
Returns the value of attribute threshold_watts.
9 10 11 |
# File 'lib/todays_plan/activity/power.rb', line 9 def threshold_watts @threshold_watts end |
#tscorepwr ⇒ Object (readonly)
Returns the value of attribute tscorepwr.
11 12 13 |
# File 'lib/todays_plan/activity/power.rb', line 11 def tscorepwr @tscorepwr end |
#vi ⇒ Object (readonly)
Returns the value of attribute vi.
17 18 19 |
# File 'lib/todays_plan/activity/power.rb', line 17 def vi @vi end |
#vo2max ⇒ Object (readonly)
Returns the value of attribute vo2max.
18 19 20 |
# File 'lib/todays_plan/activity/power.rb', line 18 def vo2max @vo2max end |
#wkg ⇒ Object (readonly)
Returns the value of attribute wkg.
14 15 16 |
# File 'lib/todays_plan/activity/power.rb', line 14 def wkg @wkg end |