cartodb-4.42/app/controllers/carto/api/legend_presenter.rb
2024-04-06 05:25:13 +00:00

25 lines
542 B
Ruby

module Carto
module Api
class LegendPresenter
def initialize(legend)
@legend = legend
end
def to_hash
{
conf: @legend.conf,
created_at: @legend.created_at,
definition: @legend.definition,
id: @legend.id,
layer_id: @legend.layer_id,
post_html: @legend.post_html,
pre_html: @legend.pre_html,
title: @legend.title,
type: @legend.type,
updated_at: @legend.updated_at
}
end
end
end
end