Class: Tyt::Season

Inherits:
Hashie::Dash
  • Object
show all
Defined in:
lib/tyt/season.rb

Instance Method Summary collapse

Instance Method Details

#total_daysObject



10
11
12
# File 'lib/tyt/season.rb', line 10

def total_days
  days.count
end

#total_runsObject



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_feetObject



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_metersObject



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