Ok... after i got my first sample working i was keen on further abstracting the code.
Thanks to excellent input from Luc Duponcheel and Tony Morris the following code shows how you can further abstract the previous article with the help of implicits.
TraversableComponent.scala:
FileComponent.scala
FileComponentTest.scala
Now the only thing missing is a predicate which will be used to determine if the file should be printed or not....
some use case...
if file-extension is .xml
if filename contains "test"
To be continued....
No comments:
Post a Comment