# File lib/childprocess/tools/generator.rb, line 124 def result if @sizeof.empty? && @constants.empty? raise "no data collected, nothing to do" end out = ['module ChildProcess::Unix::Platform'] out << ' SIZEOF = {' max = @sizeof.keys.map { |e| e.length }.max @sizeof.each_with_index do |(type, size), idx| out << " :#{type.ljust max} => #{size}#{',' unless idx == @sizeof.size - 1}" end out << ' }' max = @constants.keys.map { |e| e.length }.max @constants.each do |name, val| out << " #{name.ljust max} = #{val}" end out << 'end' out.join "\n" end