Class: EdifactConverter::XML::XftxParser::FTXElm
- Inherits:
-
Struct
- Object
- Struct
- EdifactConverter::XML::XftxParser::FTXElm
- Defined in:
- lib/edifact_converter/xml/xftx_parser.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#format ⇒ Object
Returns the value of attribute format.
-
#texts ⇒ Object
Returns the value of attribute texts.
Instance Method Summary collapse
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code
112 113 114 |
# File 'lib/edifact_converter/xml/xftx_parser.rb', line 112 def code @code end |
#format ⇒ Object
Returns the value of attribute format
112 113 114 |
# File 'lib/edifact_converter/xml/xftx_parser.rb', line 112 def format @format end |
#texts ⇒ Object
Returns the value of attribute texts
112 113 114 |
# File 'lib/edifact_converter/xml/xftx_parser.rb', line 112 def texts @texts end |
Instance Method Details
#insert_before(node) ⇒ Object
113 114 115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/edifact_converter/xml/xftx_parser.rb', line 113 def insert_before(node) ftx = Nokogiri::XML::Node.new "FTX", node.document Nokogiri::XML::Builder.with(ftx) do |xml| xml.Elm { xml.SubElm code } xml.Elm { xml.SubElm format } xml.Elm xml.Elm { texts.each do |text| xml.SubElm text end } end node.add_previous_sibling ftx end |