Sha256: 7048b288f0aa7324d2e2c0a4a6d0505799a3f1e4d6b45b4ce5c686e5d5fecf59

Contents?: true

Size: 352 Bytes

Versions: 12

Compression:

Stored size: 352 Bytes

Contents

module ModsDisplay
  class Extent < Field
    def fields
      return [] unless extent_fields.present?
      [
        ModsDisplay::Values.new(
          label: I18n.t('mods_display.extent'),
          values: extent_fields.map(&:text)
        )
      ]
    end

    private

    def extent_fields
      @values.map(&:extent).flatten
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mods_display-1.0.0.alpha4 lib/mods_display/fields/extent.rb
mods_display-1.0.0.alpha3 lib/mods_display/fields/extent.rb
mods_display-1.0.0.alpha2 lib/mods_display/fields/extent.rb
mods_display-1.0.0.alpha1 lib/mods_display/fields/extent.rb
mods_display-0.10.1 lib/mods_display/fields/extent.rb
mods_display-0.10.0 lib/mods_display/fields/extent.rb
mods_display-0.9.1 lib/mods_display/fields/extent.rb
mods_display-0.9.0 lib/mods_display/fields/extent.rb
mods_display-0.8.0 lib/mods_display/fields/extent.rb
mods_display-0.7.1 lib/mods_display/fields/extent.rb
mods_display-0.7.0 lib/mods_display/fields/extent.rb
mods_display-0.6.0 lib/mods_display/fields/extent.rb