Class | EDI::Collection |
In: |
lib/edi4r.rb
|
Parent: | EDI::Object |
An EDI collection instance behaves like a simplified array. In addition, it permits access to its elements through their names. This implies that only objects with a name may be stored, i.e. derivatives of EDI::Object.
The element reference operator [] supports two access modes:
Array-like: | Return indexed element when passing an integer |
By name: | Return array of element(s) whose name(s) match given string |
Similar to Array#push(), but automatically setting obj’s parent and root to self and self’s root. Returns obj.
This implementation of +inspect()+ is very verbose in that it inspects also all contained objects in a recursive manner.
indent: | String offset to use for indentation / pretty-printing |
symlist: | Array of getter names (passed as symbols) whose values are to be listed. Note that :name is included automatically. |