Class: RageRender::ImageDrop
- Inherits:
-
Jekyll::Drops::Drop
- Object
- Jekyll::Drops::Drop
- RageRender::ImageDrop
- Extended by:
- Forwardable, Pipettes
- Defined in:
- lib/ragerender/jekyll/image.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#html ⇒ Object
the html contents of this loop iteration.
-
#imageonlyhtml ⇒ Object
an <img> tag containing the image, without surrounding link.
- #imageurl ⇒ Object
-
#initialize(obj, comicdrop) ⇒ ImageDrop
constructor
A new instance of ImageDrop.
Methods included from Pipettes
clean_payload, def_data_delegator, def_image_metadata, def_loop, def_pages, def_safe_delegator, extended, loops, own_methods
Constructor Details
#initialize(obj, comicdrop) ⇒ ImageDrop
Returns a new instance of ImageDrop.
10 11 12 13 14 |
# File 'lib/ragerender/jekyll/image.rb', line 10 def initialize(obj, comicdrop) super(obj) @comic = comicdrop @image_obj = obj end |
Instance Method Details
#html ⇒ Object
the html contents of this loop iteration. this includes stuff like a surrounding link to the next page
27 28 29 30 31 32 33 |
# File 'lib/ragerender/jekyll/image.rb', line 27 def html filehtml || [ nextcomic ? "<a href=\"#{nextcomic}\">" : '', imageonlyhtml, nextcomic ? '</a>' : '', ].join end |
#imageonlyhtml ⇒ Object
an <img> tag containing the image, without surrounding link
17 18 19 20 21 22 23 |
# File 'lib/ragerender/jekyll/image.rb', line 17 def imageonlyhtml filehtml || <<~HTML <img id="comicimage" src="#{imageurl}" alt="#{comictitle}" width="#{width}" height="#{height}" title="#{comicdescription}"> HTML end |
#imageurl ⇒ Object
50 51 52 |
# File 'lib/ragerender/jekyll/image.rb', line 50 def imageurl image_url unless filehtml end |