Added muscle groups.

Commit
f4ec595f31b6b6834839318dc6a39c0d854b0c4a
Author
Marius Peter <marius.peter@tutanota.com>
Author date
Committer
Marius Peter <marius.peter@tutanota.com>
Committer date
src/MyFitnessTracker/MFTMuscleGroup.class.st
index 00000000..004c7734 000000..100644
@@ -0,0 +1,166 @@
1 Added: Class {
2 Added: #name : #MFTMuscleGroup,
3 Added: #superclass : #Object,
4 Added: #instVars : [
5 Added: 'description',
6 Added: 'muscles',
7 Added: 'name'
8 Added: ],
9 Added: #category : #MyFitnessTracker
10 Added: }
11 Added:
12 Added: { #category : #'body part creation' }
13 Added: MFTMuscleGroup class >> abdominal [
14 Added:
15 Added: ^ self new
16 Added: name: 'abdominal';
17 Added: description: 'The abdominal muscles constitute the core.';
18 Added: muscles: {
19 Added: MFTMuscle rectusAbdominis.
20 Added: MFTMuscle externalOblique.
21 Added: MFTMuscle internalOblique.
22 Added: MFTMuscle transversusAbdominis };
23 Added: yourself
24 Added: ]
25 Added:
26 Added: { #category : #'body part creation' }
27 Added: MFTMuscleGroup class >> arm [
28 Added:
29 Added: ^ self new
30 Added: name: 'arm';
31 Added: yourself
32 Added: ]
33 Added:
34 Added: { #category : #'body part creation' }
35 Added: MFTMuscleGroup class >> back [
36 Added:
37 Added: ^ self new
38 Added: name: 'back';
39 Added: yourself
40 Added: ]
41 Added:
42 Added: { #category : #'body part creation' }
43 Added: MFTMuscleGroup class >> calf [
44 Added:
45 Added: ^ self new
46 Added: name: 'calf';
47 Added: yourself
48 Added: ]
49 Added:
50 Added: { #category : #'body part creation' }
51 Added: MFTMuscleGroup class >> chest [
52 Added:
53 Added: ^ self new
54 Added: name: 'chest';
55 Added: yourself
56 Added: ]
57 Added:
58 Added: { #category : #'body part creation' }
59 Added: MFTMuscleGroup class >> forearm [
60 Added:
61 Added: ^ self new
62 Added: name: 'forearm';
63 Added: yourself
64 Added: ]
65 Added:
66 Added: { #category : #'body part creation' }
67 Added: MFTMuscleGroup class >> hip [
68 Added:
69 Added: ^ self new
70 Added: name: 'hip';
71 Added: yourself
72 Added: ]
73 Added:
74 Added: { #category : #'body part creation' }
75 Added: MFTMuscleGroup class >> leg [
76 Added:
77 Added: ^ self new
78 Added: name: 'leg';
79 Added: yourself
80 Added: ]
81 Added:
82 Added: { #category : #'body part creation' }
83 Added: MFTMuscleGroup class >> shoulder [
84 Added:
85 Added: ^ self new
86 Added: name: 'shoulder';
87 Added: yourself
88 Added: ]
89 Added:
90 Added: { #category : #accessing }
91 Added: MFTMuscleGroup >> description [
92 Added:
93 Added: ^ description
94 Added: ]
95 Added:
96 Added: { #category : #accessing }
97 Added: MFTMuscleGroup >> description: aString [
98 Added:
99 Added: description := aString
100 Added: ]
101 Added:
102 Added: { #category : #initialization }
103 Added: MFTMuscleGroup >> initialize [
104 Added:
105 Added: super initialize.
106 Added: name := String new.
107 Added: description := String new.
108 Added: muscles := OrderedCollection new
109 Added: ]
110 Added:
111 Added: { #category : #accessing }
112 Added: MFTMuscleGroup >> muscles [
113 Added:
114 Added: ^ muscles
115 Added: ]
116 Added:
117 Added: { #category : #accessing }
118 Added: MFTMuscleGroup >> muscles: anObject [
119 Added:
120 Added: muscles := anObject
121 Added: ]
122 Added:
123 Added: { #category : #accessing }
124 Added: MFTMuscleGroup >> name [
125 Added:
126 Added: ^ name
127 Added: ]
128 Added:
129 Added: { #category : #accessing }
130 Added: MFTMuscleGroup >> name: aString [
131 Added:
132 Added: name := aString
133 Added: ]
134 Added:
135 Added: { #category : #accessing }
136 Added: MFTMuscleGroup >> nameEnglish [
137 Added:
138 Added: ^ name
139 Added: ]
140 Added:
141 Added: { #category : #rendering }
142 Added: MFTMuscleGroup >> renderContentOn: html [
143 Added:
144 Added: html container: [
145 Added: html heading: name capitalized.
146 Added: description ifNotEmpty: [
147 Added: html
148 Added: text: description;
149 Added: break ].
150 Added: muscles ifNotEmpty: [
151 Added: html
152 Added: text: 'This group is comprised of:';
153 Added: definitionList: [
154 Added: muscles do: [ :muscle |
155 Added: html definitionTerm: [
156 Added: html text: muscle nameEnglish.
157 Added: muscle nameLatin ifNotEmpty: [
158 Added: html space.
159 Added: html text: '('.
160 Added: html anchor
161 Added: url: muscle linkTerminologiaAnatomica;
162 Added: with: muscle nameLatin.
163 Added: html text: ')' ] ].
164 Added: html definitionData: muscle description.
165 Added: muscle renderContentOn: html ] ] ] ]
166 Added: ]