Created
January 27, 2009 03:10
-
-
Save taylor/53140 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| class PushupRoutine | |
| attr_accessor :slowreps, :fastreps, :defspeed, :inc, :inc_when | |
| alias increment :inc | |
| def initialize(opts={}) | |
| @defspeed = opts[:speed] || "fast" | |
| @slowreps = opts[:slow] || 1 | |
| @fastreps = opts[:fast] || 1 | |
| @inc = opts[:inc] || 0 | |
| @repsets = [] | |
| end | |
| def add_repset(speed=@defspeed, num_reps=@fastreps) | |
| if speed != "slow" and speed != "fast" | |
| return nil | |
| end | |
| @repsets << {:speed => speed, :reps => num_reps} | |
| end | |
| def repset(n=0..-1) | |
| return @repsets[n] | |
| end | |
| end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment