module Eancom module Edifact class Header < DocumentElement def to_json_hash hash = {} hash[:header] = {} @segments.each do |segment| hash[:header].merge! segment.to_json_hash end hash end end end end