blob: 00754763f8f2cb310ea92dab51684679872f8e8f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
class Csv::Exercise
attr_accessor :name, :weight_kg, :weight_lb
attr_accessor :sets
def initialize(attributes = {})
attributes.each do |attribute|
send("#{attribute.first}=", attribute.last)
end
end
def matches?(exercise)
name.downcase == exercise.name&.downcase
end
end
|