class Workouts::Day
Attributes
day_number[R]
workouts[R]
Public Class Methods
new(round_type, day_number)
click to toggle source
# File lib/workouts/day.rb, line 6 def initialize(round_type, day_number) @round_type = round_type @day_number = day_number @workouts = load_workouts end
Private Instance Methods
ab_ripper_workout?(workout_name)
click to toggle source
# File lib/workouts/day.rb, line 14 def ab_ripper_workout?(workout_name) [ Routine::CHEST_AND_BACK, Routine::SHOULDERS_AND_ARMS, Routine::LEGS_AND_BACK, Routine::CHEST_SHOULDERS_AND_TRICEPS, Routine::BACK_AND_BICEPS ].include?(workout_name) end
load_workouts()
click to toggle source
# File lib/workouts/day.rb, line 24 def load_workouts workouts = [] workouts << Workout.new(workout_name) workouts << Workout.new(Routine::AB_RIPPER_X) if ab_ripper_workout?(workout_name) workouts end
workout_name()
click to toggle source
# File lib/workouts/day.rb, line 31 def workout_name case @round_type when :classic Routine.classic(@day_number) when :lean Routine.lean(@day_number) end end