Sha256: 9549bbdc117e86cfcc6ff6c8978e5c423f2028ff907158cb6c8e525ed413b974

Contents?: true

Size: 489 Bytes

Versions: 58

Compression:

Stored size: 489 Bytes

Contents

module Govspeak
  class AttachmentImagePresenter
    attr_reader :attachment

    def initialize(attachment)
      @attachment = AttachmentPresenter.new(attachment)
    end

    def url
      attachment.url
    end

    def alt_text
      (attachment.title || "").tr("\n", " ")
    end

    def caption
      nil
    end

    def credit
      nil
    end

    def id
      attachment.id
    end

    def figcaption?
      false
    end

    def figcaption_html
      nil
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
govspeak-8.7.0 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.6.1 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.6.0 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.5.1 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.5.0 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.4.1 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.4.0 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.3.4 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.3.3 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.3.2 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.3.1 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.3.0 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.2.1 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.2.0 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.1.0 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.0.1 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-8.0.0 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-7.1.1 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-7.1.0 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-7.0.2 lib/govspeak/presenters/attachment_image_presenter.rb