class EdifactConverter::EDI2XML11::XmlHandler::XmlElement
Constants
- ATTRIBUTES
Public Class Methods
new(options)
click to toggle source
# File lib/edifact_converter/edi2xml11/xml_handler.rb, line 18 def initialize(options) self.children = [] options.each do |attribute, value| if ATTRIBUTES.include? attribute.to_sym send "#{attribute}=", value end end parent.children << self if parent end
Public Instance Methods
render(xml)
click to toggle source
# File lib/edifact_converter/edi2xml11/xml_handler.rb, line 28 def render(xml) args = [] args << text if text attributes = {} unless EdifactConverter::Configuration.hide_position? attributes[:linie] = position.line attributes[:position] = position.column end attributes[:hidden] = true if hidden args << attributes xml.send(name, *args) do |newxml| children.each do |child| child.render xml end end end