2019-08-06 17:54:17 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# Define un campo de imagen
|
|
|
|
class MetadataImage < MetadataTemplate
|
|
|
|
# Una ruta vacía a la imagen con una descripción vacía
|
|
|
|
def default_value
|
2019-08-13 19:09:23 +00:00
|
|
|
{ 'path' => '', 'description' => '' }
|
2019-08-06 17:54:17 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def empty?
|
|
|
|
value == default_value
|
|
|
|
end
|
2019-08-13 23:33:57 +00:00
|
|
|
|
|
|
|
def to_param
|
|
|
|
{ name => %i[description path] }
|
|
|
|
end
|
2019-08-06 17:54:17 +00:00
|
|
|
end
|