Class: Workouts::Workout

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Workout

Returns a new instance of Workout.



7
8
9
10
11
# File 'lib/workouts/workout.rb', line 7

def initialize(name)
  @name = name
  @moves = []
  load_moves
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



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

def description
  @description
end

#movesObject (readonly)

Returns the value of attribute moves.



5
6
7
# File 'lib/workouts/workout.rb', line 5

def moves
  @moves
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end