Class: Workouts::Round
- Inherits:
-
Object
- Object
- Workouts::Round
- Defined in:
- lib/workouts/round.rb
Instance Attribute Summary collapse
-
#days ⇒ Object
readonly
Returns the value of attribute days.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type = :classic) ⇒ Round
constructor
A new instance of Round.
- #workouts ⇒ Object
Constructor Details
#initialize(type = :classic) ⇒ Round
Returns a new instance of Round.
6 7 8 9 |
# File 'lib/workouts/round.rb', line 6 def initialize(type = :classic) @type = type @days = load_days end |
Instance Attribute Details
#days ⇒ Object (readonly)
Returns the value of attribute days.
3 4 5 |
# File 'lib/workouts/round.rb', line 3 def days @days end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/workouts/round.rb', line 4 def type @type end |
Instance Method Details
#workouts ⇒ Object
11 12 13 |
# File 'lib/workouts/round.rb', line 11 def workouts @days.map(&:workouts) end |