I committed a version.
I tried to create some tests but, in its current form, its difficult to
test the titles of the entities in a distribution map.
On Thu, May 31, 2012 at 5:25 PM, Usman Bhatti <usman.bhatti(a)gmail.com>wrote;wrote:
Thats correct. We need to clean this code, its a
implementation method
that somehow proliferated into the abstract class.
I'll take care of it.
I think we already discussed about integrated Kontract in Moose on this
list. Otherwise, we should look for another alternative to achieve word
contraction task.
regards,
Usman
On Thu, May 31, 2012 at 5:10 PM, Mariano Martinez Peck <
marianopeck(a)gmail.com> wrote:
AbstractDistributionMap >>
defaultTitleFormattingBlock
^ [ :each |
| t |
t := each.
(t beginsWith: 'Citezen-')
ifTrue: [ t := t copyReplaceAll: 'Citezen-' with: 'C' ].
(t beginsWith: 'Seaside-')
ifTrue: [ t := t copyReplaceAll: 'Seaside-' with: 'S' ].
t := t copyReplaceAll: 'Tests-' with: 'T-'.
"t := (Kontract reduce: t upTo: 10)."
t ]
On the one hand, it hardcodes stuff like Citizen or Seaside. But what is
worse is that that Kontract does not exist...
Cheers,
--
Mariano
http://marianopeck.wordpress.com
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev