const classafFancordion::CommandCtx
sys::Obj afFancordion::CommandCtx
Contains contextual information about a Fancordion command.
- applyVariables
Str applyVariables(Str text := this.cmdPath)Applies Fancordion variables to the given str. Specifically it replaces portions of the string with:
#TEXT -> cmdText.toCode#FIXTURE -> "fixture"
The following are replaced in table commands:
#COL -> tableColIdx#COL[0] -> tableCols[0].toCode#COL[1] -> tableCols[1].toCode#COL[n] -> tableCols[n].toCode#COLS -> tableCols.toCode#ROW -> tableRowIdx#ROW[0] -> table[0].toCode#ROW[1] -> table[1].toCode#ROW[n] -> table[n].toCode#ROWS -> table.toCode
- cmdPath
const Str cmdPathThe path portion of the command URI (minus the scheme):
[text]`scheme:path`
- cmdScheme
const Str cmdSchemeThe scheme portion of the command URI:
[text]`scheme:path`
- cmdText
const Str cmdTextThe text portion of the command:
[text]`scheme:path`
For table column commands this is the column text.
- cmdUri
const Str cmdUriThe command URI.
- executeOnFixture
Void executeOnFixture(Obj fixture, Str code)Executes the given code against the fixture instance. Example:
executeOnFixture(fixture, "echo()") --> fixture.echo()
- getFromFixture
Obj? getFromFixture(Obj fixture, Str code)Executes the given code on the fixture instance and returns a value. Example:
getFromFixture(fixture, "toStr()") --> return fixture.toStr()
- ignore
const Bool ignoreIs set to
trueif there has been previous errors in the fixture and this command should be ignored.- table
const Str[][]? tableThe table being processed. Only available in table commands.
- tableColIdx
const Int? tableColIdxThe 0-based table col index. Only available in table row commands.
- tableCols
const Str[]? tableColsThe columns that make up the current table row. Only available in table row commands.
- tableRowIdx
const Int? tableRowIdxThe 0-based table row index. Only available in table row commands.