author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 19 Sep 2012 01:38:26 +0000 | |
changeset 20 | 8caf2f257260 |
parent 16 | 25ac697dc747 |
permissions | -rw-r--r-- |
11
d354ac2af7ec
Metacello package refactoring - phase 2~
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10
diff
changeset
|
1 |
"{ Package: 'stx:goodies/metacello/core' }" |
1 | 2 |
|
3 |
MetacelloMethodSection subclass:#MetacelloVersionMethodSection |
|
4 |
instanceVariableNames:'block versionSpec parent methodSections' |
|
5 |
classVariableNames:'' |
|
6 |
poolDictionaries:'' |
|
7 |
category:'Metacello-Core-Constructors' |
|
8 |
! |
|
9 |
||
10 |
||
11 |
!MetacelloVersionMethodSection methodsFor:'accessing'! |
|
12 |
||
13 |
addMethodSection: methodSection |
|
14 |
||
15 |
methodSection parent: self. |
|
16 |
self methodSections add: methodSection |
|
17 |
! |
|
18 |
||
19 |
attributeOrPath |
|
16
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
20 |
| path | |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
21 |
^self parent == nil |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
22 |
ifTrue: [ self attribute ] |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
23 |
ifFalse: [ self parent attributePath , {(self attribute)} ] |
1 | 24 |
! |
25 |
||
26 |
attributePath |
|
16
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
27 |
| path | |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
28 |
path := {self attribute.}. |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
29 |
^self parent == nil |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
30 |
ifTrue: [ path ] |
25ac697dc747
- Updated from branch master
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
14
diff
changeset
|
31 |
ifFalse: [ self parent attributePath , path ] |
1 | 32 |
! |
33 |
||
34 |
block |
|
35 |
^ block |
|
36 |
! |
|
37 |
||
38 |
block: anObject |
|
39 |
block := anObject |
|
40 |
! |
|
41 |
||
42 |
methodSections |
|
43 |
||
44 |
methodSections ifNil: [ methodSections := OrderedCollection new ]. |
|
45 |
^methodSections |
|
46 |
! |
|
47 |
||
48 |
parent |
|
49 |
^ parent |
|
50 |
! |
|
51 |
||
52 |
parent: anObject |
|
53 |
parent := anObject |
|
54 |
! |
|
55 |
||
56 |
topParent |
|
57 |
self parent == nil |
|
58 |
ifTrue: [ ^ self ]. |
|
59 |
^ self parent topParent |
|
60 |
! |
|
61 |
||
62 |
versionSpec |
|
63 |
^ versionSpec |
|
64 |
! |
|
65 |
||
66 |
versionSpec: anObject |
|
67 |
versionSpec := anObject |
|
68 |
! ! |
|
69 |
||
70 |
!MetacelloVersionMethodSection class methodsFor:'documentation'! |
|
71 |
||
72 |
version_SVN |
|
73 |
^ '$Id:: $' |
|
74 |
! ! |