Class: Tyt::Season
- Inherits:
-
Hashie::Dash
- Object
- Hashie::Dash
- Tyt::Season
- Defined in:
- lib/tyt/season.rb
Instance Method Summary collapse
- #total_days ⇒ Object
- #total_runs ⇒ Object
- #total_vertical_feet ⇒ Object
- #total_vertical_meters ⇒ Object
Instance Method Details
#total_days ⇒ Object
10 11 12 |
# File 'lib/tyt/season.rb', line 10 def total_days days.count end |
#total_runs ⇒ Object
6 7 8 |
# File 'lib/tyt/season.rb', line 6 def total_runs days.inject(0){|all_year,ski_day| all_year += ski_day.runs} end |
#total_vertical_feet ⇒ Object
14 15 16 |
# File 'lib/tyt/season.rb', line 14 def total_vertical_feet days.inject(0){|all_year,ski_day| all_year += ski_day.vertical_feet} end |
#total_vertical_meters ⇒ Object
18 19 20 |
# File 'lib/tyt/season.rb', line 18 def total_vertical_meters days.inject(0){|all_year,ski_day| all_year += ski_day.vertical_meters} end |