Class: Govspeak::AttachmentImagePresenter
- Inherits:
-
Object
- Object
- Govspeak::AttachmentImagePresenter
- Defined in:
- lib/govspeak/presenters/attachment_image_presenter.rb
Instance Attribute Summary collapse
-
#attachment ⇒ Object
readonly
Returns the value of attribute attachment.
Instance Method Summary collapse
- #alt_text ⇒ Object
- #caption ⇒ Object
- #credit ⇒ Object
- #figcaption? ⇒ Boolean
- #figcaption_html ⇒ Object
- #id ⇒ Object
-
#initialize(attachment) ⇒ AttachmentImagePresenter
constructor
A new instance of AttachmentImagePresenter.
- #url ⇒ Object
Constructor Details
#initialize(attachment) ⇒ AttachmentImagePresenter
Returns a new instance of AttachmentImagePresenter.
5 6 7 |
# File 'lib/govspeak/presenters/attachment_image_presenter.rb', line 5 def initialize() @attachment = AttachmentPresenter.new() end |
Instance Attribute Details
#attachment ⇒ Object (readonly)
Returns the value of attribute attachment.
3 4 5 |
# File 'lib/govspeak/presenters/attachment_image_presenter.rb', line 3 def @attachment end |
Instance Method Details
#alt_text ⇒ Object
13 14 15 |
# File 'lib/govspeak/presenters/attachment_image_presenter.rb', line 13 def alt_text (.title || "").tr("\n", " ") end |
#caption ⇒ Object
17 18 19 |
# File 'lib/govspeak/presenters/attachment_image_presenter.rb', line 17 def nil end |
#credit ⇒ Object
21 22 23 |
# File 'lib/govspeak/presenters/attachment_image_presenter.rb', line 21 def credit nil end |
#figcaption? ⇒ Boolean
29 30 31 |
# File 'lib/govspeak/presenters/attachment_image_presenter.rb', line 29 def false end |
#figcaption_html ⇒ Object
33 34 35 |
# File 'lib/govspeak/presenters/attachment_image_presenter.rb', line 33 def nil end |
#id ⇒ Object
25 26 27 |
# File 'lib/govspeak/presenters/attachment_image_presenter.rb', line 25 def id .id end |
#url ⇒ Object
9 10 11 |
# File 'lib/govspeak/presenters/attachment_image_presenter.rb', line 9 def url .url end |