Skip to content

Commit

Permalink
Merge pull request #21 from inaka/ramabit.improve.readme
Browse files Browse the repository at this point in the history
Ramabit.improve.readme
  • Loading branch information
Brujo Benavides committed Jan 25, 2016
2 parents 1ed1fae + c85bc40 commit fdb3b14
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ dependencies {

### Code examples


```kotlin
val onSuccess: (String) -> Unit = {
result: String ->
Expand All @@ -47,9 +46,16 @@ dependencies {
"test" // implicit return
}

KillerTask(doWork, onSuccess, onFailed).go()
var killerTask = KillerTask(doWork, onSuccess, onFailed)
```
```kotlin
killerTask.go() // to execute it
```
or simply:
```kotlin
killerTask.cancel() // to cancel it
```

Or simply you can do:

```kotlin
KillerTask(
Expand Down

0 comments on commit fdb3b14

Please sign in to comment.