Module: Card::Set::Abstract::Media::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- tmpsets/set/mod001-utility/abstract/media.rb
Instance Method Summary collapse
- #image_alt ⇒ Object
- #image_card ⇒ Object
- #image_src(opts) ⇒ Object
- #text_with_image(opts = {}) ⇒ Object
Instance Method Details
#image_alt ⇒ Object
18 19 20 |
# File 'tmpsets/set/mod001-utility/abstract/media.rb', line 18 def image_alt image_card&.name end |
#image_card ⇒ Object
9 10 11 |
# File 'tmpsets/set/mod001-utility/abstract/media.rb', line 9 def image_card @image_card ||= card.fetch(trait: :image) end |
#image_src(opts) ⇒ Object
13 14 15 16 |
# File 'tmpsets/set/mod001-utility/abstract/media.rb', line 13 def image_src opts return "" unless image_card nest(image_card, view: :source, size: opts[:size]) end |