Skip to content

Commit

Permalink
Move extension already present in GS64 to a Pharo package
Browse files Browse the repository at this point in the history
  • Loading branch information
gcotelli committed Aug 7, 2023
1 parent 81b8372 commit 8cedce2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions source/BaselineOfBuoy/BaselineOfBuoy.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,12 @@ BaselineOfBuoy >> baselineCollections: spec [
package: 'Buoy-Collections-Extensions'
with: [ spec requires: 'Buoy-Collections' ];
group: 'Deployment' with: 'Buoy-Collections-Extensions';
package: 'Buoy-Collections-Pharo-Extensions'
with: [ spec requires: 'Buoy-Collections' ];
group: 'Deployment' with: 'Buoy-Collections-Pharo-Extensions';
package: 'Buoy-Collections-Tests' with: [
spec requires: #( 'Buoy-Collections' 'Buoy-Collections-Extensions'
'Buoy-Collections-Pharo-Extensions'
'Dependent-SUnit-Extensions' ) ];
group: 'Tests' with: 'Buoy-Collections-Tests'
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ SequenceableCollection >> copyFirst: n [
^ [ self copyFrom: 1 to: n ] unless: n = 0 inWhichCase: [ self species new ]
]

{ #category : #'*Buoy-Collections-Extensions' }
SequenceableCollection >> copyLast: n [

^ [ self copyFrom: self size - n + 1 to: self size ] unless: n = 0 inWhichCase: [ self species new ]
]

{ #category : #'*Buoy-Collections-Extensions' }
SequenceableCollection >> copyNoMoreThanFirst: n [

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Extension { #name : #SequenceableCollection }

{ #category : #'*Buoy-Collections-Pharo-Extensions' }
SequenceableCollection >> copyLast: n [

^ [ self copyFrom: self size - n + 1 to: self size ] unless: n = 0 inWhichCase: [ self species new ]
]
1 change: 1 addition & 0 deletions source/Buoy-Collections-Pharo-Extensions/package.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package { #name : #'Buoy-Collections-Pharo-Extensions' }

0 comments on commit 8cedce2

Please sign in to comment.