class EdifactConverter::EDI2XML11::ParentGroupHandler
Attributes
ancestors[RW]
Public Instance Methods
endSegmentGroup(name)
click to toggle source
Calls superclass method
# File lib/edifact_converter/edi2xml11/parent_group_handler.rb, line 27 def endSegmentGroup(name) if name == 'BrevIndhold' ancestors.reverse_each do |parent| super(parent) end super self.ancestors = nil elsif locator.rules.children.any? ancestors << name else super end end
startSegmentGroup(name, hidden = false)
click to toggle source
Calls superclass method
# File lib/edifact_converter/edi2xml11/parent_group_handler.rb, line 13 def startSegmentGroup(name, hidden = false) if ancestors self.ancestors = ancestors.drop_while do |parent_group| if locator.rules.child?(name) false else next_handler.endSegmentGroup(parent_group) true end end end super end