debian-mirror-gitlab/lib/api/entities/basic_badge_details.rb
2020-03-09 13:42:32 +05:30

17 lines
438 B
Ruby

# 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