fix eventbus doc-code (#21189)

remove `new AnyRef`

before:

```
new AnyRef {
  class Listener extends Actor {
    def receive = {
      case m: Jazz       => println(s"${self.path.name} is listening to: ${m.artist}")
      case m: Electronic => println(s"${self.path.name} is listening to: ${m.artist}")
    }
  }
```

after:
```
class Listener extends Actor {
  def receive = {
    case m: Jazz       => println(s"${self.path.name} is listening to: ${m.artist}")
    case m: Electronic => println(s"${self.path.name} is listening to: ${m.artist}")
  }
}
```
This commit is contained in:
matsu-chara 2016-08-16 22:20:44 +09:00 committed by Konrad Malawski
parent 3e2bdb55a3
commit 1cb088ed81

View file

@ -152,12 +152,13 @@ class LoggingDocSpec extends AkkaSpec {
"demonstrate superclass subscriptions on eventStream" in {
def println(s: String) = ()
//#superclass-subscription-eventstream
abstract class AllKindsOfMusic { def artist: String }
case class Jazz(artist: String) extends AllKindsOfMusic
case class Electronic(artist: String) extends AllKindsOfMusic
new AnyRef {
//#superclass-subscription-eventstream
abstract class AllKindsOfMusic { def artist: String }
case class Jazz(artist: String) extends AllKindsOfMusic
case class Electronic(artist: String) extends AllKindsOfMusic
class Listener extends Actor {
def receive = {
case m: Jazz => println(s"${self.path.name} is listening to: ${m.artist}")