Sha256: a87a3c5add0b7818be23f318860c5341c36784d1f37754b5ad252356c9f260ee

Contents?: true

Size: 419 Bytes

Versions: 16

Compression:

Stored size: 419 Bytes

Contents

module Eancom
  module Edifact

    class DocumentElement

      attr_accessor :segments

      def initialize
        @segments = []
      end

      def segment(segment)
        segments << segment
      end

      def to_s(debug: false)
        stream = ""
        segments.each do |segment|
          stream << segment.to_edi
          stream << "\n" if debug
        end
        stream
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
eancom-1.6.3 lib/eancom/edifact/document_element.rb
eancom-1.6.2 lib/eancom/edifact/document_element.rb
eancom-1.6.0 lib/eancom/edifact/document_element.rb
eancom-1.5.7 lib/eancom/edifact/document_element.rb
eancom-1.5.6 lib/eancom/edifact/document_element.rb
eancom-1.5.5 lib/eancom/edifact/document_element.rb
eancom-1.5.4 lib/eancom/edifact/document_element.rb
eancom-1.5.2 lib/eancom/edifact/document_element.rb
eancom-1.5.1 lib/eancom/edifact/document_element.rb
eancom-1.5.0 lib/eancom/edifact/document_element.rb
eancom-1.4.0 lib/eancom/edifact/document_element.rb
eancom-1.3.0 lib/eancom/edifact/document_element.rb
eancom-1.2.0 lib/eancom/edifact/document_element.rb
eancom-1.1.1 lib/eancom/edifact/document_element.rb
eancom-1.1.0 lib/eancom/edifact/document_element.rb
eancom-2.0.0 lib/eancom/edifact/document_element.rb