mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-26 02:46:21 +00:00
21 lines
343 B
Ruby
21 lines
343 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Una lista de valores
|
|
class MetadataArray < MetadataTemplate
|
|
# El valor por defecto es una array vacía
|
|
def default_value
|
|
super || []
|
|
end
|
|
|
|
private
|
|
|
|
def sanitize(values)
|
|
values.map do |v|
|
|
if v.is_a? String
|
|
super(v).sub(/\.\z/, '')
|
|
else
|
|
v
|
|
end
|
|
end
|
|
end
|
|
end
|