# 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

  • is

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

  • define
  • onInit
  • onObservable

# API Documentation

# Functions

# is

Signature cp.rx.go.Statement.Definition.is(thing) -> boolean
Type Function
Description Checks if the thing is an instance of Statement.Definition.
Parameters
  • thing - The thing to check.
Returns
  • true if the thing is a Statement.Definition.
Notes None
Examples None
Source src/extensions/cp/rx/go/Statement.lua line 225

# Methods

# define

Signature cp.rx.go.Statement.Definition:define() -> Statement
Type Method
Description Completes the definition of the Statement.
Parameters
  • None
Returns
Notes None
Examples None
Source src/extensions/cp/rx/go/Statement.lua line 292

# onInit

Signature cp.rx.go.Statement.Definition:onInit(initFn) -> Statement.Definition
Type Method
Description Defines 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.
Examples None
Source src/extensions/cp/rx/go/Statement.lua line 243

# onObservable

Signature cp.rx.go.Statement.Definition:onObservable(observableFn) -> Statement.Definition
Type Method
Description Defines 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
Notes None
Examples None
Source src/extensions/cp/rx/go/Statement.lua line 262