Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0

Defined in: adventure/ParsedNoun.js, line 5

Framework class

Description

ParsedNoun is a special class constructed by Parser.parseNoun(), and used to store metadata about an asset and lists of all possible matches for that asset. This is an internal class that authors should not need to construct.

Private Constructor:

var foo = new adventurejs.ParsedNoun(asset)

Parameters:

Inherited Overrides

Methods Collapse all  |  Expand all

Properties  | 

exclude
exclude :Boolean

Defined in: adventure/ParsedNoun.js, line 32

Default value: false

input
input :String

Defined in: adventure/ParsedNoun.js, line 74

Default value: ""

The asset name found in user input, though that may already have been replaced with an asset ID by the time this noun gets parsed.
is_assumed
is_assumed :Boolean

Defined in: adventure/ParsedNoun.js, line 141

Default value: false

isGroup
isGroup :Boolean

Defined in: adventure/ParsedNoun.js, line 53

Default value: false

isPlural
isPlural :Boolean

Defined in: adventure/ParsedNoun.js, line 46

Default value: false

matches
matches :Object

Defined in: adventure/ParsedNoun.js, line 104

Default value: { all:[], direction:false, qualified:[], qualifiedIndex:0, unambiguous:""}

Save a variety of information about assets that matched the input.
object_id
object_id :Getter

Defined in: adventure/ParsedNoun.js, line 151

Getter function looks for a qualified object id, and if it doesn't find one, it returns the first qualified match.
original_input
original_input :String

Defined in: adventure/ParsedNoun.js, line 89

Default value: ""

During parsing we may replace the original input string with the ID of a found asset. Ensure that we keep the original.
plural
plural :String

Defined in: adventure/ParsedNoun.js, line 39

Default value: ""

preposition
preposition :String

Defined in: adventure/ParsedNoun.js, line 134

Default value: ""

qualified_object_id
qualified_object_id :String

Defined in: adventure/ParsedNoun.js, line 97

If a singular asset was found that matched the input, store its ID here.
serialized_input
serialized_input :String

Defined in: adventure/ParsedNoun.js, line 82

Default value: ""

Serializing input changes to lowercase, replaces spaces with underscores.
singular
singular :String

Defined in: adventure/ParsedNoun.js, line 60

Default value: ""

type
type :String

Defined in: adventure/ParsedNoun.js, line 67

Default value: ""