5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 02:41:41 +00:00
panel/app/models/metadata_array.rb

22 lines
334 B
Ruby
Raw Normal View History

2019-08-06 17:54:17 +00:00
# frozen_string_literal: true
# Una lista de valores
class MetadataArray < MetadataTemplate
# El valor por defecto es una array vacía
def default_value
[]
end
2019-08-13 23:33:57 +00:00
private
def sanitize(values)
values.map do |v|
if v.is_a? String
super(v).sub(/\.\z/, '')
else
v
end
end
end
2019-08-06 17:54:17 +00:00
end