blob: 7b1a0be75cab927b0d2aa353535faabfe1d1607c (
plain)
1
2
3
4
5
6
7
8
9
10
|
# frozen_string_literal: true
class ClusterApplicationEntity < Grape::Entity
expose :name
expose :status_name, as: :status
expose :status_reason
expose :external_ip, if: -> (e, _) { e.respond_to?(:external_ip) }
expose :hostname, if: -> (e, _) { e.respond_to?(:hostname) }
expose :email, if: -> (e, _) { e.respond_to?(:email) }
end
|