Class: ForestAdminAgent::Serializer::ForestChartSerializer

Inherits:
Object
  • Object
show all
Defined in:
lib/forest_admin_agent/serializer/forest_chart_serializer.rb

Class Method Summary collapse

Class Method Details

.serialize(chart) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/forest_admin_agent/serializer/forest_chart_serializer.rb', line 6

def self.serialize(chart)
  {
    data: {
      id: SecureRandom.uuid,
      type: 'stats',
      attributes: {
        value: chart
      }
    }
  }
end