field.rb

lib/nwn/gff/field.rb
Last Update: Sun Jul 31 18:16:20 +0200 2011

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']