Class: Workouts::Move

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Move

Returns a new instance of Move.



11
12
13
14
15
16
17
18
# File 'lib/workouts/move.rb', line 11

def initialize(options = {})
  @name = options[:name]
  @completed = false
  @reps = 0

  @weight = options[:weight] || false
  @break = options[:break] || false
end

Instance Attribute Details

#breakObject (readonly)

Returns the value of attribute break.



8
9
10
# File 'lib/workouts/move.rb', line 8

def break
  @break
end

#completedObject

Returns the value of attribute completed.



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

def completed
  @completed
end

#descriptionObject

Returns the value of attribute description.



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

def description
  @description
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/workouts/move.rb', line 9

def name
  @name
end

#repsObject

Returns the value of attribute reps.



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

def reps
  @reps
end

#weightObject

Returns the value of attribute weight.



6
7
8
# File 'lib/workouts/move.rb', line 6

def weight
  @weight
end