gitlab-org--gitlab-foss/app/serializers/job_group_entity.rb
2017-06-13 09:53:54 +02:00

16 lines
312 B
Ruby

class JobGroupEntity < Grape::Entity
include RequestAwareEntity
expose :name
expose :size
expose :detailed_status, as: :status, with: StatusEntity
expose :jobs, with: JobEntity
private
alias_method :group, :object
def detailed_status
group.detailed_status(request.current_user)
end
end