Class: ForestLiana::StatSerializer

Inherits:
Object
  • Object
show all
Includes:
ForestAdmin::JSONAPI::Serializer
Defined in:
app/serializers/forest_liana/stat_serializer.rb

Instance Method Summary collapse

Instance Method Details

#format_name(attribute_name) ⇒ Object


11
12
13
# File 'app/serializers/forest_liana/stat_serializer.rb', line 11

def format_name(attribute_name)
  attribute_name.to_s
end

27
28
29
# File 'app/serializers/forest_liana/stat_serializer.rb', line 27

def relationship_related_link(attribute_name)
  nil
end

23
24
25
# File 'app/serializers/forest_liana/stat_serializer.rb', line 23

def relationship_self_link(attribute_name)
  nil
end

19
20
21
# File 'app/serializers/forest_liana/stat_serializer.rb', line 19

def self_link
  nil
end

#typeObject


7
8
9
# File 'app/serializers/forest_liana/stat_serializer.rb', line 7

def type
  'stats'
end

#unformat_name(attribute_name) ⇒ Object


15
16
17
# File 'app/serializers/forest_liana/stat_serializer.rb', line 15

def unformat_name(attribute_name)
  attribute_name.to_s.underscore
end