# frozen_string_literal: true # Un campo de idioma class MetadataLang < MetadataTemplate include Metadata::NonIndexableConcern include Metadata::AlwaysPublicConcern def default_value super || I18n.locale end # @return [Symbol] def document_value document.collection.label.to_sym end # @return [Symbol] def value self[:value] ||= document_value || default_value end # Todos los locales # # @return [Array] def values site.locales end end