Cake Pattern ã®èª¬æ㯠Programming Scala ããããhttp://jonasboner.com/2008/10/06/real-world-scala-dependency-injection-di/ ã®æ¹ãåãããããã£ãã§ãã ä¸å¿ãèªåãªãã«ç解ã§ããã¤ããã§ããã®ã§ãã¨ããããç°¡åãªä¾ãæ¸ãã¦ããã¾ãã åºç¾ããã³ã³ãã¼ãã³ã㯠FooãBar ã®äºã¤ãBar ã Foo ã«ä¾åãã¦ããä¾ã§ãã package sample01 trait FooComponent { val foo: Foo class Foo { def output(text: String) = println(text) } } trait BarComponent { self: FooComponent => val bar: Bar class Bar { def pr
{{#tags}}- {{label}}
{{/tags}}