Class: Workouts::Round

Inherits:
Object
  • Object
show all
Defined in:
lib/workouts/round.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#daysObject (readonly)

Returns the value of attribute days.



3
4
5
# File 'lib/workouts/round.rb', line 3

def days
  @days
end

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/workouts/round.rb', line 4

def type
  @type
end

Instance Method Details

#workoutsObject



11
12
13
# File 'lib/workouts/round.rb', line 11

def workouts
  @days.map(&:workouts)
end