Skip to content

Commit

Permalink
Fixed red test by implementing the class side withValue: method
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanmontt committed Feb 7, 2025
1 parent 8989c7f commit 7a268e2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/MyCounter/MyCounter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,24 @@ Class {
#package : 'MyCounter'
}

{ #category : 'initialization' }
MyCounter class >> withValue: anInteger [

^ self new
count: anInteger;
yourself
]

{ #category : 'accessing' }
MyCounter >> count [
^ count
]

{ #category : 'accessing' }
MyCounter >> count: anInteger [
count := anInteger
]

{ #category : 'initialization' }
MyCounter >> decrement [

Expand Down

0 comments on commit 7a268e2

Please sign in to comment.