debian-mirror-gitlab/app/serializers/diff_viewer_entity.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
374 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
class DiffViewerEntity < Grape::Entity
expose :partial_name, as: :name
2019-07-07 11:18:12 +05:30
expose :render_error, as: :error
expose :render_error_message, as: :error_message
expose :collapsed?, as: :collapsed
2023-06-20 00:43:36 +05:30
expose :whitespace_only, if: ->(_, _) { Feature.enabled?(:add_ignore_all_white_spaces) } do |_, options|
options[:whitespace_only]
end
2018-12-05 23:21:45 +05:30
end