clikt / com.github.ajalt.clikt.parameters.options / OptionTransformContext

OptionTransformContext

class OptionTransformContext : Option

A receiver for options transformers.

Constructors

Name Summary
<init> A receiver for options transformers.OptionTransformContext(option:Option, context:Context)

Properties

Name Summary
context val context:Context
option The option that was invokedval option:Option

Functions

Name Summary
fail Throw an exception indicating that usage was incorrect.fun fail(message:String):Nothing
message Issue a message that can be shown to the userfun message(message:String):Unit
require If value is false, call fail with the output of lazyMessagefun require(value:Boolean, lazyMessage: () ->String= { "invalid value" }):Unit