2019-06-21 00:45:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class AwardEmojiPresenter < Gitlab::View::Presenter::Delegated
|
2021-09-21 05:12:21 -04:00
|
|
|
presents ::AwardEmoji, as: :award_emoji
|
2019-06-21 00:45:27 -04:00
|
|
|
|
|
|
|
def description
|
|
|
|
as_emoji['description']
|
|
|
|
end
|
|
|
|
|
|
|
|
def unicode
|
|
|
|
as_emoji['unicode']
|
|
|
|
end
|
|
|
|
|
|
|
|
def emoji
|
|
|
|
as_emoji['moji']
|
|
|
|
end
|
|
|
|
|
|
|
|
def unicode_version
|
|
|
|
Gitlab::Emoji.emoji_unicode_version(award_emoji.name)
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def as_emoji
|
|
|
|
@emoji ||= Gitlab::Emoji.emojis[award_emoji.name] || {}
|
|
|
|
end
|
|
|
|
end
|