only / com.skydoves.only

Package com.skydoves.only

Types

Only

object Only

Easy way to run block codes only as many times as necessary.

Annotations

OnlyDsl

annotation class OnlyDsl

Extensions for External Classes

android.content.Context

android.view.View

Functions

only

fun only(name: String, times: Int, block: Builder.() -> Unit): Unit

Run Only by Only.Builder using kotlin dsl.

onlyOnce

fun onlyOnce(name: String, times: Int = 1, block: Builder.() -> Unit): Unit

Run only once Only by Only.Builder using kotlin dsl.

onlyThrice

fun onlyThrice(name: String, times: Int = 3, block: Builder.() -> Unit): Unit

Run only thrice Only by Only.Builder using kotlin dsl.

onlyTwice

fun onlyTwice(name: String, times: Int = 2, block: Builder.() -> Unit): Unit

Run only twice Only by Only.Builder using kotlin dsl.