module Eancom module Edifact class Segment attr_accessor :name, :composites def initialize(name = "") @name = name @composites = [] end def composite(content = "") @composites << content end def to_s stream = "" stream << name @composites.each do |composite| stream << DELIMITERS[:data] stream << composite end stream end end end end