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-7.0.1 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-7.0.0 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.8.4 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.8.3 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.8.2 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.8.1 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.8.0 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.7.8 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.7.7 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.7.6 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.7.5 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.7.4 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.7.3 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.7.2 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.7.1 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.7.0 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.6.0 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.5.11 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.5.10 lib/govspeak/presenters/attachment_image_presenter.rb
govspeak-6.5.9 lib/govspeak/presenters/attachment_image_presenter.rb