Sha256: 525b758ee86e533d75bf2c2f57f8ade0be99a70894e14c2def4660d3ab4b19ea

Contents?: true

Size: 388 Bytes

Versions: 46

Compression:

Stored size: 388 Bytes

Contents

# frozen_string_literal: true

module SirTrevorRails
  module Blocks
    ###
    # Uploaded images with text
    ###
    class UploadedItemsBlock < SirTrevorRails::Block
      include Textable

      def files
        (item || {}).map { |_, file| file }.select { |file| file[:display].to_s == 'true' }
      end

      def zpr_link?
        zpr_link == 'true'
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
blacklight-spotlight-3.0.3 app/models/sir_trevor_rails/blocks/uploaded_items_block.rb
blacklight-spotlight-3.0.2 app/models/sir_trevor_rails/blocks/uploaded_items_block.rb
blacklight-spotlight-3.0.1 app/models/sir_trevor_rails/blocks/uploaded_items_block.rb
blacklight-spotlight-3.0.0 app/models/sir_trevor_rails/blocks/uploaded_items_block.rb
blacklight-spotlight-3.0.0.rc6 app/models/sir_trevor_rails/blocks/uploaded_items_block.rb
blacklight-spotlight-3.0.0.rc5 app/models/sir_trevor_rails/blocks/uploaded_items_block.rb