[Pharo] Personal fitness tracker web app.
1
"
2
I represent a muscle of the human body.
3
"
4
Class {
5
#name : 'MFTMuscle',
6
#superclass : 'MFTObject',
7
#instVars : [
8
'latinName',
9
'englishName',
10
'description'
11
],
12
#category : 'MyFitnessTracker-Core-Anatomy',
13
#package : 'MyFitnessTracker-Core',
14
#tag : 'Anatomy'
15
}
16
17
{ #category : 'as yet unclassified' }
18
MFTMuscle class >> bicepsBrachii [
19
20
^ self newWithLatinName
21
englishName: 'biceps';
22
yourself
23
]
24
25
{ #category : 'as yet unclassified' }
26
MFTMuscle class >> brachioRadialis [
27
28
^ self newWithLatinName
29
englishName: 'brachioradialis';
30
description:
31
'Located in the forearm, it is responsible for flexing the forearm at the elbow joint.';
32
yourself
33
]
34
35
{ #category : 'as yet unclassified' }
36
MFTMuscle class >> deltoidAnterior [
37
38
^ self new
39
englishName: 'deltoid (anterior)';
40
latinName: 'deltoideus';
41
yourself
42
]
43
44
{ #category : 'as yet unclassified' }
45
MFTMuscle class >> deltoidMedial [
46
47
^ self new
48
englishName: 'deltoid (medial)';
49
latinName: 'deltoideus';
50
yourself
51
]
52
53
{ #category : 'as yet unclassified' }
54
MFTMuscle class >> deltoidPosterior [
55
56
^ self new
57
englishName: 'deltoid (posterior)';
58
latinName: 'deltoideus';
59
yourself
60
]
61
62
{ #category : 'as yet unclassified' }
63
MFTMuscle class >> erectorSpinae [
64
65
^ self newWithLatinName
66
englishName: 'erectors';
67
description:
68
'This group of muscles runs along the spine and is responsible for extending the vertebral column and maintaining an upright posture.';
69
yourself
70
]
71
72
{ #category : 'as yet unclassified' }
73
MFTMuscle class >> extensorCarpiRadialiasBrevis [
74
75
^ self newWithLatinName
76
englishName: 'Extensor Carpi Radialis Brevis';
77
description:
78
'Located in the forearm, it is responsible for extending the wrist and abducting the hand.';
79
yourself
80
]
81
82
{ #category : 'as yet unclassified' }
83
MFTMuscle class >> extensorCarpiRadialisLongus [
84
85
^ self newWithLatinName
86
englishName: 'Extensor Carpi Radialis Longus';
87
description:
88
'Located in the forearm, it is responsible for extending the wrist and abducting the hand.';
89
yourself
90
]
91
92
{ #category : 'as yet unclassified' }
93
MFTMuscle class >> extensorCarpiUlnaris [
94
95
^ self newWithLatinName
96
englishName: 'Extensor Carpi Ulnaris';
97
description:
98
'Located in the forearm, it is responsible for extending the wrist and adducting the hand.';
99
yourself
100
]
101
102
{ #category : 'as yet unclassified' }
103
MFTMuscle class >> flexorCarpiRadialis [
104
105
^ self newWithLatinName
106
englishName: 'Flexor Carpi Radialis';
107
description:
108
'Located in the forearm, it is responsible for flexing the wrist and abducting the hand.';
109
yourself
110
]
111
112
{ #category : 'as yet unclassified' }
113
MFTMuscle class >> flexorCarpiUlnaris [
114
115
^ self newWithLatinName
116
englishName: 'Flexor Carpi Ulnaris';
117
description:
118
'Located in the forearm, it is responsible for flexing the wrist and adducting the hand.';
119
yourself
120
]
121
122
{ #category : 'as yet unclassified' }
123
MFTMuscle class >> gastrocnemius [
124
125
^ self newWithLatinName
126
englishName: 'calf';
127
description:
128
'Located in the calf, it is responsible for plantar flexion of the foot (pointing toes).';
129
yourself
130
]
131
132
{ #category : 'as yet unclassified' }
133
MFTMuscle class >> gluteusMaximus [
134
135
^ self newWithLatinName
136
englishName: 'glutes';
137
description:
138
'The largest muscle in the buttocks, responsible for hip extension, outward rotation, and abduction.';
139
yourself
140
]
141
142
{ #category : 'as yet unclassified' }
143
MFTMuscle class >> gluteusMedius [
144
145
^ self newWithLatinName
146
englishName: 'glutes';
147
description:
148
'Located in the buttocks, it plays a role in hip abduction and medial rotation.';
149
yourself
150
]
151
152
{ #category : 'as yet unclassified' }
153
MFTMuscle class >> gluteusMinimus [
154
155
^ self newWithLatinName
156
englishName: 'glutes';
157
description:
158
'Also located in the buttocks, it assists in hip abduction and medial rotation, working with the gluteus medius.';
159
yourself
160
]
161
162
{ #category : 'as yet unclassified' }
163
MFTMuscle class >> hamstring [
164
165
^ self newWithLatinName
166
englishName: 'hamstrings';
167
description:
168
'This group of muscles includes the biceps femoris, semitendinosus, and semimembranosus. They are located in the back of the thigh and are responsible for knee flexion and hip extension.';
169
yourself
170
]
171
172
{ #category : 'as yet unclassified' }
173
MFTMuscle class >> latissimusDorsi [
174
175
^ self newWithLatinName
176
englishName: 'lats';
177
description:
178
'Also known as the "lats," these muscles are located in the upper back and are responsible for shoulder adduction and extension.';
179
yourself
180
]
181
182
{ #category : 'instance creation' }
183
MFTMuscle class >> newWithLatinName [
184
"I return a MFTMuscle instance for which latinName is set to the calling method selector, as a space-separated string."
185
186
| latinNameFromSender |
187
latinNameFromSender := (thisContext sender selector splitCamelCase
188
collect: #asLowercase) joinUsing:
189
Character space.
190
^ self new latinName: latinNameFromSender
191
]
192
193
{ #category : 'as yet unclassified' }
194
MFTMuscle class >> obliquusExternusAbdominis [
195
196
^ self newWithLatinName
197
englishName: 'external oblique';
198
description: 'Located on the front and side of the abdomen.';
199
yourself
200
]
201
202
{ #category : 'as yet unclassified' }
203
MFTMuscle class >> obliquusInternusAbdominis [
204
205
^ self newWithLatinName
206
englishName: 'internal oblique';
207
description: 'Located on the front and side of the abdomen.';
208
yourself
209
]
210
211
{ #category : 'as yet unclassified' }
212
MFTMuscle class >> pectoralisMajor [
213
214
^ self newWithLatinName
215
englishName: 'pectoral';
216
description:
217
'Commonly known as the "pecs," these muscles are in the chest and are responsible for shoulder flexion and adduction.';
218
yourself
219
]
220
221
{ #category : 'as yet unclassified' }
222
MFTMuscle class >> pectoralisMinor [
223
224
^ self newWithLatinName
225
englishName: 'pectoral';
226
description:
227
'Located beneath the pectoralis major, it plays a role in stabilizing the shoulder blade and assisting in deep breathing.';
228
yourself
229
]
230
231
{ #category : 'as yet unclassified' }
232
MFTMuscle class >> quadricepsFemoris [
233
234
^ self newWithLatinName
235
englishName: 'quad';
236
description:
237
'A group of four muscles on the front of the thigh, responsible for knee extension.';
238
yourself
239
]
240
241
{ #category : 'as yet unclassified' }
242
MFTMuscle class >> rectusAbdominis [
243
244
^ self newWithLatinName
245
englishName: 'six-pack';
246
description:
247
'Located along the front of the abdomen. Colloquially known as the "six-pack"';
248
yourself
249
]
250
251
{ #category : 'as yet unclassified' }
252
MFTMuscle class >> rotatorCuff [
253
254
^ self newWithLatinName
255
englishName: 'rotator cuff';
256
description:
257
'This group includes four muscles: supraspinatus, infraspinatus, teres minor, and subscapularis. They play a crucial role in stabilizing the shoulder joint and facilitating arm rotation.';
258
yourself
259
]
260
261
{ #category : 'as yet unclassified' }
262
MFTMuscle class >> soleus [
263
264
^ self newWithLatinName
265
englishName: 'calf';
266
description:
267
'Also located in the calf, it assists the gastrocnemius in plantar flexion and helps maintain posture.';
268
yourself
269
]
270
271
{ #category : 'as yet unclassified' }
272
MFTMuscle class >> transversusAbdominis [
273
274
^ self newWithLatinName
275
englishName: 'abs';
276
description:
277
'Deepest abdominal muscle. Wraps around the spine for protection and stability.';
278
yourself
279
]
280
281
{ #category : 'as yet unclassified' }
282
MFTMuscle class >> trapezius [
283
284
^ self newWithLatinName
285
englishName: 'trap';
286
description:
287
'The trapezius muscles are located in the upper back and neck. They play a role in moving and stabilizing the shoulder blades.';
288
yourself
289
]
290
291
{ #category : 'as yet unclassified' }
292
MFTMuscle class >> tricepsBrachii [
293
294
^ self newWithLatinName
295
englishName: 'triceps';
296
yourself
297
]
298
299
{ #category : 'comparing' }
300
MFTMuscle >> = anObject [
301
"Answer whether the receiver and anObject represent the same object."
302
303
self == anObject ifTrue: [ ^ true ].
304
self class = anObject class ifFalse: [ ^ false ].
305
^ englishName = anObject englishName and: [
306
latinName = anObject latinName ]
307
]
308
309
{ #category : 'accessing' }
310
MFTMuscle >> canonicalName [
311
312
^ latinName
313
]
314
315
{ #category : 'accessing' }
316
MFTMuscle >> description [
317
318
^ description
319
]
320
321
{ #category : 'accessing' }
322
MFTMuscle >> description: anObject [
323
324
description := anObject
325
]
326
327
{ #category : 'as yet unclassified' }
328
MFTMuscle >> englishName [
329
330
^ englishName
331
]
332
333
{ #category : 'as yet unclassified' }
334
MFTMuscle >> englishName: aString [
335
336
englishName := aString
337
]
338
339
{ #category : 'comparing' }
340
MFTMuscle >> hash [
341
"Answer an integer value that is related to the identity of the receiver."
342
343
^ englishName hash bitXor: latinName hash
344
]
345
346
{ #category : 'initialization' }
347
MFTMuscle >> initialize [
348
349
super initialize.
350
latinName := String new.
351
englishName := String new.
352
description := String new
353
]
354
355
{ #category : 'as yet unclassified' }
356
MFTMuscle >> latinName [
357
358
^ latinName
359
]
360
361
{ #category : 'as yet unclassified' }
362
MFTMuscle >> latinName: aString [
363
364
latinName := aString
365
]
366
367
{ #category : 'as yet unclassified' }
368
MFTMuscle >> linkTerminologiaAnatomica [
369
370
^ 'http://terminologia-anatomica.org/en/Search?query=musculus {1}'
371
format: { latinName }
372
]
373