debian-mirror-gitlab/lib/api/entities/basic_badge_details.rb

18 lines
438 B
Ruby
Raw Normal View History

2020-03-09 13:42:32 +05:30
# frozen_string_literal: true
module API
module Entities
class BasicBadgeDetails < Grape::Entity
expose :name
expose :link_url
expose :image_url
expose :rendered_link_url do |badge, options|
badge.rendered_link_url(options.fetch(:project, nil))
end
expose :rendered_image_url do |badge, options|
badge.rendered_image_url(options.fetch(:project, nil))
end
end
end
end