Class: RunbyPace::RunbyRange
- Inherits:
-
Object
- Object
- RunbyPace::RunbyRange
- Defined in:
- lib/runby_pace/runby_range.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#fast ⇒ Object
readonly
Returns the value of attribute fast.
-
#slow ⇒ Object
readonly
Returns the value of attribute slow.
Instance Method Summary collapse
-
#initialize ⇒ RunbyRange
constructor
A new instance of RunbyRange.
- #to_s ⇒ Object
Constructor Details
#initialize ⇒ RunbyRange
Returns a new instance of RunbyRange.
6 7 8 9 10 |
# File 'lib/runby_pace/runby_range.rb', line 6 def initialize @fast = nil @slow = nil raise 'RunbyRange is a base class for PaceRange and SpeedRange. Instantiate one of them instead.' end |
Instance Attribute Details
#fast ⇒ Object (readonly)
Returns the value of attribute fast.
4 5 6 |
# File 'lib/runby_pace/runby_range.rb', line 4 def fast @fast end |
#slow ⇒ Object (readonly)
Returns the value of attribute slow.
4 5 6 |
# File 'lib/runby_pace/runby_range.rb', line 4 def slow @slow end |
Instance Method Details
#to_s ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/runby_pace/runby_range.rb', line 12 def to_s if @fast == @slow "#{@fast}" else "#{@fast}-#{@slow}" end end |