debian-mirror-gitlab/app/serializers/job_group_entity.rb
2017-09-10 17:25:29 +05:30

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