Created
April 29, 2017 00:41
-
-
Save kkenny/8be9a2ee7a8d04f2170fec431d6a6888 to your computer and use it in GitHub Desktop.
Randomized Workout Schedule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
workout = [ "leg", "chest", "arm", "back", "shoulder", "core", "cardio", "rest" ].sample | |
sets = (2..5).to_a.sample | |
reps = (5..12).to_a.sample | |
case workout | |
when "leg" | |
exercises = [ 'Squats', 'Lunges', 'Calf Raises', 'Dead Lift', 'Rear Lunge', 'Dumbell Step-ups' ] | |
url = 'https://www.bodybuilding.com/content/5-leg-workouts-for-mass-a-beginners-guide.html' | |
when "chest" | |
exercises = [ 'Incline Dumbell Press', 'Dumbell Flys', 'Push-Ups', 'Decline Dumbell Press', 'Decline Dumbell Flys' ] | |
url = 'https://www.bodybuilding.com/content/beginner-chest-training-guide.html' | |
when "arm" | |
exercises = [ 'Tricep Pulldown', 'Hammer Curl', 'Close Grip Barbell Curl', 'Medium Grip Barbell Curl', 'Wide Grip Barbell Curl', 'Overhead Tricep Extension', 'Tricep Dips' ] | |
url = 'https://www.bodybuilding.com/content/beginner-arm-training-guide.html' | |
when "back" | |
exercises = [ 'Mid Back - Bent Over Barbell Row', 'Mid Back - Seated Cable Rows', 'Lat Pulldowns', 'Traps - Shoulder Shrugs', 'Lower Back - Stiff Leg Good Mornings' ] | |
url = 'https://www.bodybuilding.com/content/5-back-workouts-for-mass-a-beginners-guide.html' | |
when "shoulder" | |
exercises = [ 'Side Laterals', 'Front Raises', 'Push-Ups', 'Reverse Flyes', 'Dumbell Shoulder Press', 'Low Pully Deltoid Raise', 'Military Press' ] | |
url = 'https://www.bodybuilding.com/content/5-shoulder-workouts-for-mass-a-beginners-guide.html' | |
when "core" | |
exercises = [ 'Cable Crunches', 'Side Bends', 'Crunches', 'Leg Raises', 'Plank', 'Russian Twists' ] | |
url = 'https://www.bodybuilding.com/content/beginner-core-training-guide.html' | |
when "cardio" | |
exercises = [ 'Bike', 'Walk', 'Stairs', 'Jump Rope', 'Burpies' ] | |
end | |
puts "Today is #{workout} day. \n\n" | |
puts "You need to do #{sets} sets of #{reps} reps for the following exercises: \n" unless workout == "cardio" || workout == "rest" | |
exercises.each do |exercise| | |
puts "#{exercise}\n" | |
end unless exercises == nil | |
puts "\n" | |
puts url unless url == nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment