mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-17 05:46:23 +00:00
21 lines
334 B
Ruby
21 lines
334 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
|
|
[]
|
|
end
|
|
|
|
private
|
|
|
|
def sanitize(values)
|
|
values.map do |v|
|
|
if v.is_a? String
|
|
super(v).sub(/\.\z/, '')
|
|
else
|
|
v
|
|
end
|
|
end
|
|
end
|
|
end
|