2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-08-18 17:15:46 -04:00
|
|
|
class EmbeddableHostSerializer < ApplicationSerializer
|
2020-07-26 20:23:54 -04:00
|
|
|
TO_SERIALIZE = %i[id host allowed_paths class_name category_id]
|
2015-08-18 17:15:46 -04:00
|
|
|
|
2016-08-23 14:55:52 -04:00
|
|
|
attributes *TO_SERIALIZE
|
2015-08-18 17:15:46 -04:00
|
|
|
|
2019-05-06 21:27:05 -04:00
|
|
|
TO_SERIALIZE.each { |attr| define_method(attr) { object.public_send(attr) } }
|
2016-08-23 14:55:52 -04:00
|
|
|
end
|