File tree Expand file tree Collapse file tree 3 files changed +45
-6
lines changed
language-adaptors/rxjava-scala
src/main/scala/rx/examples/scala Expand file tree Collapse file tree 3 files changed +45
-6
lines changed Original file line number Diff line number Diff line change @@ -14,17 +14,15 @@ tasks.withType(ScalaCompile) {
14
14
15
15
dependencies {
16
16
// Scala compiler and related tools
17
- scalaTools ' org.scala-lang:scala-compiler:2.9+'
18
- scalaTools ' org.scala-lang:scala-library:2.9+'
19
-
20
- compile ' org.scala-lang:scala-library:2.9+'
21
- provided ' org.scalatest:scalatest_2.9.1:1.8'
17
+ scalaTools ' org.scala-lang:scala-compiler:2.10+'
18
+ scalaTools ' org.scala-lang:scala-library:2.10+'
19
+ provided ' org.scalatest:scalatest_2.10:1.9.1'
22
20
23
21
compile project(' :rxjava-core' )
24
22
provided ' junit:junit:4.10'
25
23
provided ' org.mockito:mockito-core:1.8.5'
26
24
27
- testCompile ' org.scalatest:scalatest_2.9.1 :1.8 '
25
+ testCompile ' org.scalatest:scalatest_2.10 :1.9.1 '
28
26
}
29
27
30
28
task test (overwrite : true , dependsOn : testClasses) << {
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ dependencies {
40
40
41
41
// scala
42
42
scalaTools ' org.scala-lang:scala-compiler:2.10+'
43
+ scalaTools ' org.scala-lang:scala-library:2.10+'
43
44
provided ' org.scalatest:scalatest_2.10:1.9.1'
44
45
}
45
46
Original file line number Diff line number Diff line change
1
+ /**
2
+ * Copyright 2013 Netflix, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ package rx .examples .scala
17
+
18
+ import rx .Observable
19
+
20
+ class RxExamples {
21
+
22
+ def main (args : Array [String ]) {
23
+ hello(" Ben" , " George" );
24
+ }
25
+
26
+ // --------------------------------------------------
27
+ // Hello World!
28
+ // --------------------------------------------------
29
+
30
+ def hello (names : String * ) {
31
+ // can't figure out how to convert to a Java iterable
32
+ Observable .toObservable(" Ben" , " George" )
33
+ .take(2 )
34
+ .subscribe((name : String ) => {
35
+ println(" Hello " + name + " !" )
36
+ })
37
+ }
38
+
39
+ }
40
+
You can’t perform that action at this time.
0 commit comments