Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 2.88 KB

File metadata and controls

48 lines (33 loc) · 2.88 KB

subkt / myaa.subkt.tasks / ItemGroupContext / invoke

invoke

operator fun <T : Task> TaskGroup<T>.invoke(action: T.() -> Unit): Unit (source)

Create and/or configure tasks of type T for all entries in entries.

Parameters

action - A closure operating on a Task. Called once for each entry in the current context.inline operator fun <reified T : Task> String.invoke(noinline action: T.() -> Unit): TaskGroup<T> (source)

Creates a new task group with the name given by the string the function is invoked on, or returns the task group with the given name if it already exists, and configures a task for each entry in the current context using the given closure.

"copy"<SubCopy> {
    from(mux.item())
    into("downloads")
}

Parameters

T - The type of task associated with the task group.

action - A closure operating on a Task. Called once for each entry in the current context.operator fun <T : Task> KClass<T>.invoke(action: T.() -> Unit): TaskCreator<T> (source)

Returns a delegate that when accessed returns a task group with the same name as the property it is bound to. Also configures one task for each entry in the current context using the given closure.

val copy by SubCopy::class {
    from(mux.item())
    into("downloads")
}

Parameters

T - The type of task associated with the task group.

action - A closure operating on a Task. Called once for each entry in the current context.