Class: ClusterSerializer

Inherits:
BaseSerializer show all
Includes:
WithPagination
Defined in:
app/serializers/cluster_serializer.rb

Instance Attribute Summary

Attributes included from WithPagination

#paginator

Attributes inherited from BaseSerializer

#params

Instance Method Summary collapse

Methods included from WithPagination

#paginated?, #represent, #with_pagination

Methods inherited from BaseSerializer

entity, #initialize, #represent

Constructor Details

This class inherits a constructor from BaseSerializer

Instance Method Details

#represent_list(resource) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/serializers/cluster_serializer.rb', line 7

def represent_list(resource)
  represent(resource, {
    only: [
      :cluster_type,
      :enabled,
      :environment_scope,
      :id,
      :kubernetes_errors,
      :name,
      :nodes,
      :path,
      :provider_type,
      :status
    ]
  })
end

#represent_status(resource) ⇒ Object



24
25
26
# File 'app/serializers/cluster_serializer.rb', line 24

def represent_status(resource)
  represent(resource, { only: [:status, :status_reason] })
end