Skip to content

Commit

Permalink
Merge pull request #15 from inaka/ramabit.update.readme
Browse files Browse the repository at this point in the history
#14 update readme and comments
  • Loading branch information
griveroa-inaka committed Jan 22, 2016
2 parents 21f917c + c34df35 commit eca376a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repositories {
dependencies {
// ...
compile 'com.github.inaka:killertask:v1.0'
compile 'com.github.inaka:killertask:v1.1'
// ...
}
```
Expand All @@ -44,18 +44,18 @@ dependencies {
}

init {
KillerTask(doWork(), onSuccess, onFailed).go()
KillerTask(doWork, onSuccess, onFailed).go()
}

fun doWork(): String {
return "test"
val doWork: () -> String = {
"test" // implicit return
}
```
or simply:

```kotlin
KillerTask(
"test", // task
KillerTask(
{ "test" }, // task
{result: String -> Log.wtf("result", result)}, // onSuccess actions
{e: Exception? -> Log.wtf("result", e.toString())} // onFailed actions
).go()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private class ExampleFunctionsRefactor {
httpConn.connectTimeout = 3000;
httpConn.readTimeout = 5000;

// return
// implicit return
httpConn.responseCode.toString() + " " + httpConn.responseMessage
}

Expand Down

0 comments on commit eca376a

Please sign in to comment.