Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/toml/monkey_patch.rb
Instance Method Summary collapse
Instance Method Details
#to_toml ⇒ Object
15 16 17 18 19 20 |
# File 'lib/toml/monkey_patch.rb', line 15 def to_toml unless self.map(&:class).uniq.length < 2 raise "All array values must be the same type" end "[" + self.map {|v| v.to_toml }.join(",") + "]" end |