2018-11-20 20:47:30 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class DiffLineEntity < Grape::Entity
|
|
|
|
expose :line_code
|
|
|
|
expose :type
|
|
|
|
expose :old_line
|
|
|
|
expose :new_line
|
|
|
|
expose :text
|
|
|
|
expose :meta_positions, as: :meta_data
|
|
|
|
|
|
|
|
expose :rich_text do |line|
|
|
|
|
ERB::Util.html_escape(line.rich_text || line.text)
|
|
|
|
end
|
2018-12-23 12:14:25 +05:30
|
|
|
|
|
|
|
expose :suggestible?, as: :can_receive_suggestion
|
2018-11-20 20:47:30 +05:30
|
|
|
end
|