Module: Middleman::Presentation::Helpers::ImageGallery
- Defined in:
- lib/middleman-presentation-helpers/helpers/image_gallery.rb
Overview
Images helpers
Class Method Summary collapse
-
.image_gallery(images, id:) ⇒ Object
Create image gallery.
Class Method Details
.image_gallery(images, id:) ⇒ Object
Create image gallery
14 15 16 17 18 19 20 21 22 |
# File 'lib/middleman-presentation-helpers/helpers/image_gallery.rb', line 14 def image_gallery(images, id:) template = File.read(File.('../../../../templates/image_gallery.erb', __FILE__)).chomp images.each_with_object([]) do |(image, title), memo| engine = Erubis::Eruby.new(template) memo << engine.result(image_path: image, image_gallery_id: id, title: title) end.join("\n") end |