Class: Gauguin::PaletteSerializer
- Inherits:
-
Object
- Object
- Gauguin::PaletteSerializer
- Defined in:
- lib/gauguin/palette_serializer.rb
Class Method Summary collapse
Class Method Details
.dump(value) ⇒ Object
15 16 17 18 19 |
# File 'lib/gauguin/palette_serializer.rb', line 15 def self.dump(value) value = value.to_a.map { |color, group| [color.to_a, group] } value = Hash[value] YAML.dump(value) end |