2024-10-25 14:19:56 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class ExportedColumn
|
|
|
|
attr_reader :column, :libelle
|
|
|
|
|
|
|
|
def initialize(column:, libelle:)
|
|
|
|
@column = column
|
|
|
|
@libelle = libelle
|
|
|
|
end
|
|
|
|
|
|
|
|
def id = { id: column.id, libelle: }.to_json
|
2024-11-04 17:00:25 +01:00
|
|
|
|
|
|
|
def libelle_with_value(champ_or_dossier)
|
2024-11-04 17:01:36 +01:00
|
|
|
[libelle, ExportedColumnFormatter.format(column:, champ_or_dossier:)]
|
2024-11-04 17:00:25 +01:00
|
|
|
end
|
2024-10-25 14:19:56 +02:00
|
|
|
end
|