The way you use Traits on the class side is to define class-side methods in the Trait.
Doru On Sun, Nov 3, 2013 at 9:39 PM, [email protected] <[email protected]>wrote: > I have a TXXLog Trait where I have defined the following methods instance > side. > > info: aString > warn: aString > debug: aString > error: aString > > This worked well with my services where I had XXService uses: TXXLog > > services have a default class side method that return the Default instance. > > Now, I had a class where I wanted to use the trait from the class side as > well. > > But then, after Googling a bit, I found that there was the instance side > trait and the class side trait. > > What is the best practice when one wants to use, say, the TXXLog trait on > the class side? > > For my particular case, I put the info: warn: ... methods on the class > side of my trait and the instance side one do a self class info: aString > etc. > > Is that the right way to do it? > > Phil > > -- www.tudorgirba.com "Every thing has its own flow"
