field.rb

lib/nwn/gff/field.rb
Last Update: Fri Jan 15 12:18:21 +0100 2010

A Field wraps a GFF label->value pair, providing:

  • .field_type describing the field type (e.g. :int)
  • .field_value holding the value of this Field

and, if loaded by Gff::Reader or through YAML:

  • .field_label holding the label
  • .parent holding the struct this Field is child of.

Note that it is ADVISED to use the provided accessors, since they do some structure-keeping in the background. If you do NOT want it to do that, use hash-notation for access:

field['value'], field['type'], field['str_ref'], field['label']