Class: RunbyPace::SpeedRange
- Inherits:
-
RunbyRange
- Object
- RunbyRange
- RunbyPace::SpeedRange
- Defined in:
- lib/runby_pace/speed_range.rb
Instance Attribute Summary
Attributes inherited from RunbyRange
Instance Method Summary collapse
-
#initialize(fast, slow) ⇒ SpeedRange
constructor
A new instance of SpeedRange.
Methods inherited from RunbyRange
Constructor Details
#initialize(fast, slow) ⇒ SpeedRange
Returns a new instance of SpeedRange.
6 7 8 9 10 |
# File 'lib/runby_pace/speed_range.rb', line 6 def initialize(fast, slow) raise 'Invalid speed values' unless fast.is_a?(Numeric) && slow.is_a?(Numeric) @fast = fast.round(2) @slow = slow.round(2) end |