Skip to content

Commit c8ea8ba

Browse files
vjames19jknack
authored andcommitted
Makes Kooby Class open (#815)
* Made Kooby open * Kooby example
1 parent f2df155 commit c8ea8ba

File tree

2 files changed

+7
-4
lines changed
  • modules/jooby-lang-kotlin/src

2 files changed

+7
-4
lines changed

modules/jooby-lang-kotlin/src/main/kotlin/org/jooby/Jooby.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ class KRouteGroup(b: Route.Props<Route.Group>) : Route.Props<Route.Group> by b {
164164
/**
165165
* Collection of utility class and method to make Jooby more Kotlin.
166166
*/
167-
class Kooby: Jooby() {
167+
open class Kooby: Jooby() {
168168
fun <T:Any> use(klass: KClass<T>): Route.Collection {
169169
return use(klass.java)
170170
}

modules/jooby-lang-kotlin/src/test/kotlin/examples/kotlin/App.kt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
package examples.kotlin
22

33
import org.jooby.Jooby
4+
import org.jooby.Kooby
45

5-
class App: Jooby() {
6+
/**
7+
* Use Kooby to make Jooby more Kotlin.
8+
*/
9+
class App: Kooby() {
610
/**
711
* Configure your application
812
*/
913
init {
10-
11-
get ("/") { ->
14+
get ("/") {
1215
"Hi Kotlin"
1316
}
1417
}

0 commit comments

Comments
 (0)