# File lib/toml/monkey_patch.rb, line 54 def to_toml(path = "") unless self.map(&:class).uniq.length == 1 raise "All array values must be the same type" end if self.first.toml_table? toml = "" self.each do |val| toml << "\n[[#{path}]]\n" toml << val.to_toml(path) end return toml else "[" + self.map {|v| v.to_toml(path) }.join(",") + "]" end end