Class | EDI::Diagram::Diagram |
In: |
lib/edi4r/diagrams.rb
|
Parent: | Object |
Diagram: A structure class to represent a message diagram (branching diagram)
A Diagram is essentially
In contrast to a simple Branch, all nodes of a Diagram object are indexed (counting from 1) according to their natural sequence in the EDIFACT branching diagram. Thus, access by index is available for Diagram objects, but not for Branch objects.
A Diagram can become quite complex and memory-consuming. Therefore diagrams are cached after creation, so that they need to be created and maintained only once when there are several messages of the same type in an interchange.
Turns off this caching mechanism, saving memory but costing time.
Creates (and caches) a new diagram. Returns reference to existing diagram when already in cache.
std: | The syntax standard key. Currently supported:
|
params: | A hash of parameters that uniquely identify the selected diagram. Internal use only - see source code for details. |
Releases memory by flushing the cache. Needed primarily for unit tests, where many if not all available diagrams are created.