#cp.rx.go.Statement.Definition

A Statement is defined before being executable. A definition is initiated with the Statement:modifier(...) method.


#API Overview

Functions - API calls offered directly by the extension

Methods - API calls which can only be made on an object returned by a constructor


#API Documentation

#Functions

Signaturecp.rx.go.Statement.Definition.is(thing) -> boolean
TypeFunction
DescriptionChecks if the thing is an instance of Statement.Definition.
Parameters
  • thing - The thing to check.
Returns
  • true if the thing is a Statement.Definition.
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/rx/go/Statement.lua line 225

#Methods

Signaturecp.rx.go.Statement.Definition:define() -> Statement
TypeMethod
DescriptionCompletes the definition of the Statement.
Parameters
  • None
Returns
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/rx/go/Statement.lua line 292

Signaturecp.rx.go.Statement.Definition:onInit(initFn) -> Statement.Definition
TypeMethod
DescriptionDefines the function which will be called to initialise the context.
Parameters
  • initFn - The init function.
Returns
  • The Statement Definition
Notes
  • * The function will be passed the context table as the first parameter,
  • and any other parameters passed to the statement follow.
ExamplesNone
Sourcesrc/extensions/cp/rx/go/Statement.lua line 243

Signaturecp.rx.go.Statement.Definition:onObservable(observableFn) -> Statement.Definition
TypeMethod
DescriptionDefines the function which will be called to create the Observable for the Statement. The function will be passed the context table and must return an Observable.
Parameters
  • observableFn - The observable creator function.
Returns
  • The Statement.Definition
NotesNone
ExamplesNone
Sourcesrc/extensions/cp/rx/go/Statement.lua line 262